//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS CostExplorer service.
///
/// You can use the Cost Explorer API to programmatically query your cost and usage data. You can query for aggregated data such as total monthly costs or total daily usage. You can also query for granular data. This might include the number of daily write operations for Amazon DynamoDB database tables in your production environment.  Service Endpoint The Cost Explorer API provides the following endpoint:    https://ce.us-east-1.amazonaws.com    For information about the costs that are associated with the Cost Explorer API, see Amazon Web Services Cost Management Pricing.
public struct CostExplorer: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the CostExplorer client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: nil,
            partition: partition,
            amzTarget: "AWSInsightsIndexService",
            serviceName: "CostExplorer",
            serviceIdentifier: "ce",
            serviceProtocol: .json(version: "1.1"),
            apiVersion: "2017-10-25",
            endpoint: endpoint,
            serviceEndpoints: Self.serviceEndpoints,
            partitionEndpoints: Self.partitionEndpoints,
            errorType: CostExplorerErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }


    /// custom endpoints for regions
    static var serviceEndpoints: [String: String] {[
        "aws-cn-global": "ce.cn-northwest-1.amazonaws.com.cn",
        "aws-global": "ce.us-east-1.amazonaws.com",
        "aws-iso-b-global": "ce.us-isob-east-1.sc2s.sgov.gov",
        "aws-iso-f-global": "ce.us-isof-south-1.csp.hci.ic.gov",
        "aws-iso-global": "ce.us-iso-east-1.c2s.ic.gov"
    ]}

    /// Default endpoint and region to use for each partition
    static var partitionEndpoints: [AWSPartition: (endpoint: String, region: SotoCore.Region)] {[
        .aws: (endpoint: "aws-global", region: .useast1),
        .awscn: (endpoint: "aws-cn-global", region: .cnnorthwest1),
        .awsiso: (endpoint: "aws-iso-global", region: .usisoeast1),
        .awsisob: (endpoint: "aws-iso-b-global", region: .usisobeast1),
        .awsisof: (endpoint: "aws-iso-f-global", region: .usisofsouth1)
    ]}


    // MARK: API Calls

    /// Creates a new cost anomaly detection monitor with the requested type and monitor specification.
    @Sendable
    @inlinable
    public func createAnomalyMonitor(_ input: CreateAnomalyMonitorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateAnomalyMonitorResponse {
        try await self.client.execute(
            operation: "CreateAnomalyMonitor", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new cost anomaly detection monitor with the requested type and monitor specification.
    ///
    /// Parameters:
    ///   - anomalyMonitor: The cost anomaly detection monitor object that you want to create.
    ///   - resourceTags: An optional list of tags to associate with the specified  AnomalyMonitor . You can use resource tags to control access to your monitor using IAM policies. Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:   Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services use   The maximum length of a key is 128 characters   The maximum length of a value is 256 characters   Keys and values can only contain alphanumeric characters, spaces, and any of the following: _.:/=+@-    Keys and values are case sensitive   Keys and values are trimmed for any leading or trailing whitespaces   Don’t use aws: as a prefix for your keys. This prefix is reserved for Amazon Web Services use
    ///   - logger: Logger use during operation
    @inlinable
    public func createAnomalyMonitor(
        anomalyMonitor: AnomalyMonitor,
        resourceTags: [ResourceTag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateAnomalyMonitorResponse {
        let input = CreateAnomalyMonitorRequest(
            anomalyMonitor: anomalyMonitor, 
            resourceTags: resourceTags
        )
        return try await self.createAnomalyMonitor(input, logger: logger)
    }

    /// Adds an alert subscription to a cost anomaly detection monitor. You can use each subscription to define subscribers with email or SNS notifications. Email subscribers can set an absolute or percentage threshold and a time frequency for receiving notifications.
    @Sendable
    @inlinable
    public func createAnomalySubscription(_ input: CreateAnomalySubscriptionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateAnomalySubscriptionResponse {
        try await self.client.execute(
            operation: "CreateAnomalySubscription", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds an alert subscription to a cost anomaly detection monitor. You can use each subscription to define subscribers with email or SNS notifications. Email subscribers can set an absolute or percentage threshold and a time frequency for receiving notifications.
    ///
    /// Parameters:
    ///   - anomalySubscription: The cost anomaly subscription object that you want to create.
    ///   - resourceTags: An optional list of tags to associate with the specified  AnomalySubscription . You can use resource tags to control access to your subscription using IAM policies. Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:   Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services use   The maximum length of a key is 128 characters   The maximum length of a value is 256 characters   Keys and values can only contain alphanumeric characters, spaces, and any of the following: _.:/=+@-    Keys and values are case sensitive   Keys and values are trimmed for any leading or trailing whitespaces   Don’t use aws: as a prefix for your keys. This prefix is reserved for Amazon Web Services use
    ///   - logger: Logger use during operation
    @inlinable
    public func createAnomalySubscription(
        anomalySubscription: AnomalySubscription,
        resourceTags: [ResourceTag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateAnomalySubscriptionResponse {
        let input = CreateAnomalySubscriptionRequest(
            anomalySubscription: anomalySubscription, 
            resourceTags: resourceTags
        )
        return try await self.createAnomalySubscription(input, logger: logger)
    }

    /// Creates a new Cost Category with the requested name and rules.
    @Sendable
    @inlinable
    public func createCostCategoryDefinition(_ input: CreateCostCategoryDefinitionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateCostCategoryDefinitionResponse {
        try await self.client.execute(
            operation: "CreateCostCategoryDefinition", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new Cost Category with the requested name and rules.
    ///
    /// Parameters:
    ///   - defaultValue: 
    ///   - effectiveStart: The Cost Category's effective start date. It can only be a billing start date (first day of the month). If the date isn't provided, it's the first day of the current month. Dates can't be before the previous twelve months, or in the future.
    ///   - name: 
    ///   - resourceTags: An optional list of tags to associate with the specified  CostCategory . You can use resource tags to control access to your cost category using IAM policies. Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:   Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services use   The maximum length of a key is 128 characters   The maximum length of a value is 256 characters   Keys and values can only contain alphanumeric characters, spaces, and any of the following: _.:/=+@-    Keys and values are case sensitive   Keys and values are trimmed for any leading or trailing whitespaces   Don’t use aws: as a prefix for your keys. This prefix is reserved for Amazon Web Services use
    ///   - rules: The Cost Category rules used to categorize costs. For more information, see CostCategoryRule.
    ///   - ruleVersion: 
    ///   - splitChargeRules:  The split charge rules used to allocate your charges between your Cost Category values.
    ///   - logger: Logger use during operation
    @inlinable
    public func createCostCategoryDefinition(
        defaultValue: String? = nil,
        effectiveStart: String? = nil,
        name: String,
        resourceTags: [ResourceTag]? = nil,
        rules: [CostCategoryRule],
        ruleVersion: CostCategoryRuleVersion,
        splitChargeRules: [CostCategorySplitChargeRule]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateCostCategoryDefinitionResponse {
        let input = CreateCostCategoryDefinitionRequest(
            defaultValue: defaultValue, 
            effectiveStart: effectiveStart, 
            name: name, 
            resourceTags: resourceTags, 
            rules: rules, 
            ruleVersion: ruleVersion, 
            splitChargeRules: splitChargeRules
        )
        return try await self.createCostCategoryDefinition(input, logger: logger)
    }

    /// Deletes a cost anomaly monitor.
    @Sendable
    @inlinable
    public func deleteAnomalyMonitor(_ input: DeleteAnomalyMonitorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteAnomalyMonitorResponse {
        try await self.client.execute(
            operation: "DeleteAnomalyMonitor", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a cost anomaly monitor.
    ///
    /// Parameters:
    ///   - monitorArn: The unique identifier of the cost anomaly monitor that you want to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAnomalyMonitor(
        monitorArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteAnomalyMonitorResponse {
        let input = DeleteAnomalyMonitorRequest(
            monitorArn: monitorArn
        )
        return try await self.deleteAnomalyMonitor(input, logger: logger)
    }

    /// Deletes a cost anomaly subscription.
    @Sendable
    @inlinable
    public func deleteAnomalySubscription(_ input: DeleteAnomalySubscriptionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteAnomalySubscriptionResponse {
        try await self.client.execute(
            operation: "DeleteAnomalySubscription", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a cost anomaly subscription.
    ///
    /// Parameters:
    ///   - subscriptionArn: The unique identifier of the cost anomaly subscription that you want to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAnomalySubscription(
        subscriptionArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteAnomalySubscriptionResponse {
        let input = DeleteAnomalySubscriptionRequest(
            subscriptionArn: subscriptionArn
        )
        return try await self.deleteAnomalySubscription(input, logger: logger)
    }

    /// Deletes a Cost Category. Expenses from this month going forward will no longer be categorized with this Cost Category.
    @Sendable
    @inlinable
    public func deleteCostCategoryDefinition(_ input: DeleteCostCategoryDefinitionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteCostCategoryDefinitionResponse {
        try await self.client.execute(
            operation: "DeleteCostCategoryDefinition", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a Cost Category. Expenses from this month going forward will no longer be categorized with this Cost Category.
    ///
    /// Parameters:
    ///   - costCategoryArn: The unique identifier for your Cost Category.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteCostCategoryDefinition(
        costCategoryArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteCostCategoryDefinitionResponse {
        let input = DeleteCostCategoryDefinitionRequest(
            costCategoryArn: costCategoryArn
        )
        return try await self.deleteCostCategoryDefinition(input, logger: logger)
    }

    /// Returns the name, Amazon Resource Name (ARN), rules, definition, and effective dates of a Cost Category that's defined in the account. You have the option to use EffectiveOn to return a Cost Category that's active on a specific date. If there's no EffectiveOn specified, you see a Cost Category that's effective on the current date. If Cost Category is still effective, EffectiveEnd is omitted in the response.
    @Sendable
    @inlinable
    public func describeCostCategoryDefinition(_ input: DescribeCostCategoryDefinitionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeCostCategoryDefinitionResponse {
        try await self.client.execute(
            operation: "DescribeCostCategoryDefinition", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the name, Amazon Resource Name (ARN), rules, definition, and effective dates of a Cost Category that's defined in the account. You have the option to use EffectiveOn to return a Cost Category that's active on a specific date. If there's no EffectiveOn specified, you see a Cost Category that's effective on the current date. If Cost Category is still effective, EffectiveEnd is omitted in the response.
    ///
    /// Parameters:
    ///   - costCategoryArn: The unique identifier for your Cost Category.
    ///   - effectiveOn: The date when the Cost Category was effective.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeCostCategoryDefinition(
        costCategoryArn: String,
        effectiveOn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeCostCategoryDefinitionResponse {
        let input = DescribeCostCategoryDefinitionRequest(
            costCategoryArn: costCategoryArn, 
            effectiveOn: effectiveOn
        )
        return try await self.describeCostCategoryDefinition(input, logger: logger)
    }

    /// Retrieves all of the cost anomalies detected on your account during the time period that's specified by the DateInterval object. Anomalies are available for up to 90 days.
    @Sendable
    @inlinable
    public func getAnomalies(_ input: GetAnomaliesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetAnomaliesResponse {
        try await self.client.execute(
            operation: "GetAnomalies", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves all of the cost anomalies detected on your account during the time period that's specified by the DateInterval object. Anomalies are available for up to 90 days.
    ///
    /// Parameters:
    ///   - dateInterval: Assigns the start and end dates for retrieving cost anomalies. The returned anomaly object will have an AnomalyEndDate in the specified time range.
    ///   - feedback: Filters anomaly results by the feedback field on the anomaly object.
    ///   - maxResults: The number of entries a paginated response contains.
    ///   - monitorArn: Retrieves all of the cost anomalies detected for a specific cost anomaly monitor Amazon Resource Name (ARN).
    ///   - nextPageToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - totalImpact: Filters anomaly results by the total impact field on the anomaly object. For example, you can filter anomalies GREATER_THAN 200.00 to retrieve anomalies, with an estimated dollar impact greater than 200.
    ///   - logger: Logger use during operation
    @inlinable
    public func getAnomalies(
        dateInterval: AnomalyDateInterval,
        feedback: AnomalyFeedbackType? = nil,
        maxResults: Int? = nil,
        monitorArn: String? = nil,
        nextPageToken: String? = nil,
        totalImpact: TotalImpactFilter? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetAnomaliesResponse {
        let input = GetAnomaliesRequest(
            dateInterval: dateInterval, 
            feedback: feedback, 
            maxResults: maxResults, 
            monitorArn: monitorArn, 
            nextPageToken: nextPageToken, 
            totalImpact: totalImpact
        )
        return try await self.getAnomalies(input, logger: logger)
    }

    /// Retrieves the cost anomaly monitor definitions for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
    @Sendable
    @inlinable
    public func getAnomalyMonitors(_ input: GetAnomalyMonitorsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetAnomalyMonitorsResponse {
        try await self.client.execute(
            operation: "GetAnomalyMonitors", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the cost anomaly monitor definitions for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
    ///
    /// Parameters:
    ///   - maxResults: The number of entries that a paginated response contains.
    ///   - monitorArnList: A list of cost anomaly monitor ARNs.
    ///   - nextPageToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - logger: Logger use during operation
    @inlinable
    public func getAnomalyMonitors(
        maxResults: Int? = nil,
        monitorArnList: [String]? = nil,
        nextPageToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetAnomalyMonitorsResponse {
        let input = GetAnomalyMonitorsRequest(
            maxResults: maxResults, 
            monitorArnList: monitorArnList, 
            nextPageToken: nextPageToken
        )
        return try await self.getAnomalyMonitors(input, logger: logger)
    }

    /// Retrieves the cost anomaly subscription objects for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
    @Sendable
    @inlinable
    public func getAnomalySubscriptions(_ input: GetAnomalySubscriptionsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetAnomalySubscriptionsResponse {
        try await self.client.execute(
            operation: "GetAnomalySubscriptions", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the cost anomaly subscription objects for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
    ///
    /// Parameters:
    ///   - maxResults: The number of entries a paginated response contains.
    ///   - monitorArn: Cost anomaly monitor ARNs.
    ///   - nextPageToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - subscriptionArnList: A list of cost anomaly subscription ARNs.
    ///   - logger: Logger use during operation
    @inlinable
    public func getAnomalySubscriptions(
        maxResults: Int? = nil,
        monitorArn: String? = nil,
        nextPageToken: String? = nil,
        subscriptionArnList: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetAnomalySubscriptionsResponse {
        let input = GetAnomalySubscriptionsRequest(
            maxResults: maxResults, 
            monitorArn: monitorArn, 
            nextPageToken: nextPageToken, 
            subscriptionArnList: subscriptionArnList
        )
        return try await self.getAnomalySubscriptions(input, logger: logger)
    }

    /// Retrieves estimated usage records for hourly granularity or resource-level data at daily granularity.
    @Sendable
    @inlinable
    public func getApproximateUsageRecords(_ input: GetApproximateUsageRecordsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetApproximateUsageRecordsResponse {
        try await self.client.execute(
            operation: "GetApproximateUsageRecords", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves estimated usage records for hourly granularity or resource-level data at daily granularity.
    ///
    /// Parameters:
    ///   - approximationDimension: The service to evaluate for the usage records. You can choose resource-level data at daily granularity, or hourly granularity with or without resource-level data.
    ///   - granularity: How granular you want the data to be. You can enable data at hourly or daily granularity.
    ///   - services: The service metadata for the service or services you want to query. If not specified, all elements are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func getApproximateUsageRecords(
        approximationDimension: ApproximationDimension,
        granularity: Granularity,
        services: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetApproximateUsageRecordsResponse {
        let input = GetApproximateUsageRecordsRequest(
            approximationDimension: approximationDimension, 
            granularity: granularity, 
            services: services
        )
        return try await self.getApproximateUsageRecords(input, logger: logger)
    }

    /// Retrieves a commitment purchase analysis result based on the AnalysisId.
    @Sendable
    @inlinable
    public func getCommitmentPurchaseAnalysis(_ input: GetCommitmentPurchaseAnalysisRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetCommitmentPurchaseAnalysisResponse {
        try await self.client.execute(
            operation: "GetCommitmentPurchaseAnalysis", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a commitment purchase analysis result based on the AnalysisId.
    ///
    /// Parameters:
    ///   - analysisId: The analysis ID that's associated with the commitment purchase analysis.
    ///   - logger: Logger use during operation
    @inlinable
    public func getCommitmentPurchaseAnalysis(
        analysisId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetCommitmentPurchaseAnalysisResponse {
        let input = GetCommitmentPurchaseAnalysisRequest(
            analysisId: analysisId
        )
        return try await self.getCommitmentPurchaseAnalysis(input, logger: logger)
    }

    /// Retrieves cost and usage metrics for your account. You can specify which cost and usage-related metric that you want the request to return. For example, you can specify BlendedCosts or UsageQuantity. You can also filter and group your data by various dimensions, such as SERVICE or AZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in Organizations have access to all member accounts. For information about filter limitations, see Quotas and restrictions in the Billing and Cost Management User Guide.
    @Sendable
    @inlinable
    public func getCostAndUsage(_ input: GetCostAndUsageRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetCostAndUsageResponse {
        try await self.client.execute(
            operation: "GetCostAndUsage", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves cost and usage metrics for your account. You can specify which cost and usage-related metric that you want the request to return. For example, you can specify BlendedCosts or UsageQuantity. You can also filter and group your data by various dimensions, such as SERVICE or AZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in Organizations have access to all member accounts. For information about filter limitations, see Quotas and restrictions in the Billing and Cost Management User Guide.
    ///
    /// Parameters:
    ///   - billingViewArn: The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.
    ///   - filter: Filters Amazon Web Services costs by different dimensions. For example, you can specify SERVICE and LINKED_ACCOUNT and get the costs that are associated with that account's usage of that service. You can nest Expression objects to define any combination of dimension filters. For more information, see Expression.  Valid values for MatchOptions for Dimensions are EQUALS and CASE_SENSITIVE. Valid values for MatchOptions for CostCategories and Tags are EQUALS, ABSENT, and CASE_SENSITIVE. Default values are EQUALS and CASE_SENSITIVE.
    ///   - granularity: Sets the Amazon Web Services cost granularity to MONTHLY or DAILY, or HOURLY. If Granularity isn't set, the response object doesn't include the Granularity, either MONTHLY or DAILY, or HOURLY.
    ///   - groupBy: You can group Amazon Web Services costs using up to two different groups, either dimensions, tag keys, cost categories, or any two group by types. Valid values for the DIMENSION type are AZ, INSTANCE_TYPE, LEGAL_ENTITY_NAME, INVOICING_ENTITY, LINKED_ACCOUNT, OPERATION, PLATFORM, PURCHASE_TYPE, SERVICE, TENANCY, RECORD_TYPE, and USAGE_TYPE. When you group by the TAG type and include a valid tag key, you get all tag values, including empty strings.
    ///   - metrics: Which metrics are returned in the query. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill?.  Valid values are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.   If you return the UsageQuantity metric, the service aggregates all usage numbers without taking into account the units. For example, if you aggregate usageQuantity across all of Amazon EC2, the results aren't meaningful because Amazon EC2 compute hours and data transfer are measured in different units (for example, hours and GB). To get more meaningful UsageQuantity metrics, filter by UsageType or UsageTypeGroups.    Metrics is required for GetCostAndUsage requests.
    ///   - nextPageToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - timePeriod: Sets the start date and end date for retrieving Amazon Web Services costs. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01.
    ///   - logger: Logger use during operation
    @inlinable
    public func getCostAndUsage(
        billingViewArn: String? = nil,
        filter: Expression? = nil,
        granularity: Granularity,
        groupBy: [GroupDefinition]? = nil,
        metrics: [String],
        nextPageToken: String? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetCostAndUsageResponse {
        let input = GetCostAndUsageRequest(
            billingViewArn: billingViewArn, 
            filter: filter, 
            granularity: granularity, 
            groupBy: groupBy, 
            metrics: metrics, 
            nextPageToken: nextPageToken, 
            timePeriod: timePeriod
        )
        return try await self.getCostAndUsage(input, logger: logger)
    }

    /// Retrieves cost and usage comparisons for your account between two periods within the last 13 months. If you have enabled multi-year data at monthly granularity, you can go back up to 38 months.
    @Sendable
    @inlinable
    public func getCostAndUsageComparisons(_ input: GetCostAndUsageComparisonsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetCostAndUsageComparisonsResponse {
        try await self.client.execute(
            operation: "GetCostAndUsageComparisons", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves cost and usage comparisons for your account between two periods within the last 13 months. If you have enabled multi-year data at monthly granularity, you can go back up to 38 months.
    ///
    /// Parameters:
    ///   - baselineTimePeriod: The reference time period for comparison. This time period serves as the baseline against which other cost and usage data will be compared. The interval must start and end on the first day of a month, with a duration of exactly one month.
    ///   - billingViewArn: The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.
    ///   - comparisonTimePeriod: The comparison time period for analysis. This time period's cost and usage data will be compared against the baseline time period. The interval must start and end on the first day of a month, with a duration of exactly one month.
    ///   - filter: 
    ///   - groupBy: You can group results using the attributes DIMENSION, TAG, and COST_CATEGORY.
    ///   - maxResults: The maximum number of results that are returned for the request.
    ///   - metricForComparison: The cost and usage metric to compare. Valid values are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.
    ///   - nextPageToken: The token to retrieve the next set of paginated results.
    ///   - logger: Logger use during operation
    @inlinable
    public func getCostAndUsageComparisons(
        baselineTimePeriod: DateInterval,
        billingViewArn: String? = nil,
        comparisonTimePeriod: DateInterval,
        filter: Expression? = nil,
        groupBy: [GroupDefinition]? = nil,
        maxResults: Int? = nil,
        metricForComparison: String,
        nextPageToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetCostAndUsageComparisonsResponse {
        let input = GetCostAndUsageComparisonsRequest(
            baselineTimePeriod: baselineTimePeriod, 
            billingViewArn: billingViewArn, 
            comparisonTimePeriod: comparisonTimePeriod, 
            filter: filter, 
            groupBy: groupBy, 
            maxResults: maxResults, 
            metricForComparison: metricForComparison, 
            nextPageToken: nextPageToken
        )
        return try await self.getCostAndUsageComparisons(input, logger: logger)
    }

    /// Retrieves cost and usage metrics with resources for your account. You can specify which cost and usage-related metric, such as BlendedCosts or UsageQuantity, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE or AZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in Organizations have access to all member accounts. Hourly granularity is only available for EC2-Instances (Elastic Compute Cloud) resource-level data. All other resource-level data is available at daily granularity.  This is an opt-in only feature. You can enable this feature from the Cost Explorer Settings page. For information about how to access the Settings page, see Controlling Access for Cost Explorer in the Billing and Cost Management User Guide.
    @Sendable
    @inlinable
    public func getCostAndUsageWithResources(_ input: GetCostAndUsageWithResourcesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetCostAndUsageWithResourcesResponse {
        try await self.client.execute(
            operation: "GetCostAndUsageWithResources", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves cost and usage metrics with resources for your account. You can specify which cost and usage-related metric, such as BlendedCosts or UsageQuantity, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE or AZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in Organizations have access to all member accounts. Hourly granularity is only available for EC2-Instances (Elastic Compute Cloud) resource-level data. All other resource-level data is available at daily granularity.  This is an opt-in only feature. You can enable this feature from the Cost Explorer Settings page. For information about how to access the Settings page, see Controlling Access for Cost Explorer in the Billing and Cost Management User Guide.
    ///
    /// Parameters:
    ///   - billingViewArn: The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.
    ///   - filter: Filters Amazon Web Services costs by different dimensions. For example, you can specify SERVICE and LINKED_ACCOUNT and get the costs that are associated with that account's usage of that service. You can nest Expression objects to define any combination of dimension filters. For more information, see Expression.  Valid values for MatchOptions for Dimensions are EQUALS and CASE_SENSITIVE. Valid values for MatchOptions for CostCategories and Tags are EQUALS, ABSENT, and CASE_SENSITIVE. Default values are EQUALS and CASE_SENSITIVE.
    ///   - granularity: Sets the Amazon Web Services cost granularity to MONTHLY, DAILY, or HOURLY. If Granularity isn't set, the response object doesn't include the Granularity, MONTHLY, DAILY, or HOURLY.
    ///   - groupBy: You can group Amazon Web Services costs using up to two different groups: DIMENSION, TAG, COST_CATEGORY.
    ///   - metrics: Which metrics are returned in the query. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill?.  Valid values are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.   If you return the UsageQuantity metric, the service aggregates all usage numbers without taking the units into account. For example, if you aggregate usageQuantity across all of Amazon EC2, the results aren't meaningful because Amazon EC2 compute hours and data transfer are measured in different units (for example, hour or GB). To get more meaningful UsageQuantity metrics, filter by UsageType or UsageTypeGroups.    Metrics is required for GetCostAndUsageWithResources requests.
    ///   - nextPageToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - timePeriod: Sets the start and end dates for retrieving Amazon Web Services costs. The range must be within the last 14 days (the start date cannot be earlier than 14 days ago). The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01.
    ///   - logger: Logger use during operation
    @inlinable
    public func getCostAndUsageWithResources(
        billingViewArn: String? = nil,
        filter: Expression,
        granularity: Granularity,
        groupBy: [GroupDefinition]? = nil,
        metrics: [String]? = nil,
        nextPageToken: String? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetCostAndUsageWithResourcesResponse {
        let input = GetCostAndUsageWithResourcesRequest(
            billingViewArn: billingViewArn, 
            filter: filter, 
            granularity: granularity, 
            groupBy: groupBy, 
            metrics: metrics, 
            nextPageToken: nextPageToken, 
            timePeriod: timePeriod
        )
        return try await self.getCostAndUsageWithResources(input, logger: logger)
    }

    /// Retrieves an array of Cost Category names and values incurred cost.  If some Cost Category names and values are not associated with any cost, they will not be returned by this API.
    @Sendable
    @inlinable
    public func getCostCategories(_ input: GetCostCategoriesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetCostCategoriesResponse {
        try await self.client.execute(
            operation: "GetCostCategories", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves an array of Cost Category names and values incurred cost.  If some Cost Category names and values are not associated with any cost, they will not be returned by this API.
    ///
    /// Parameters:
    ///   - billingViewArn: The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.
    ///   - costCategoryName: 
    ///   - filter: 
    ///   - maxResults: This field is only used when the SortBy value is provided in the request. The maximum number of objects that are returned for this request. If MaxResults isn't specified with the SortBy value, the request returns 1000 results as the default value for this parameter. For GetCostCategories, MaxResults has an upper quota of 1000.
    ///   - nextPageToken: If the number of objects that are still available for retrieval exceeds the quota, Amazon Web Services returns a NextPageToken value in the response. To retrieve the next batch of objects, provide the NextPageToken from the previous call in your next request.
    ///   - searchString: The value that you want to search the filter values for. If you don't specify a CostCategoryName, SearchString is used to filter Cost Category names that match the SearchString pattern. If you specify a CostCategoryName, SearchString is used to filter Cost Category values that match the SearchString pattern.
    ///   - sortBy: The value that you sort the data by. The key represents the cost and usage metrics. The following values are supported:    BlendedCost     UnblendedCost     AmortizedCost     NetAmortizedCost     NetUnblendedCost     UsageQuantity     NormalizedUsageAmount    The supported key values for the SortOrder value are ASCENDING and DESCENDING. When you use the SortBy value, the NextPageToken and SearchString key values aren't supported.
    ///   - timePeriod: 
    ///   - logger: Logger use during operation
    @inlinable
    public func getCostCategories(
        billingViewArn: String? = nil,
        costCategoryName: String? = nil,
        filter: Expression? = nil,
        maxResults: Int? = nil,
        nextPageToken: String? = nil,
        searchString: String? = nil,
        sortBy: [SortDefinition]? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetCostCategoriesResponse {
        let input = GetCostCategoriesRequest(
            billingViewArn: billingViewArn, 
            costCategoryName: costCategoryName, 
            filter: filter, 
            maxResults: maxResults, 
            nextPageToken: nextPageToken, 
            searchString: searchString, 
            sortBy: sortBy, 
            timePeriod: timePeriod
        )
        return try await self.getCostCategories(input, logger: logger)
    }

    /// Retrieves key factors driving cost changes between two time periods within the last 13 months, such as usage changes, discount changes, and commitment-based savings. If you have enabled multi-year data at monthly granularity, you can go back up to 38 months.
    @Sendable
    @inlinable
    public func getCostComparisonDrivers(_ input: GetCostComparisonDriversRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetCostComparisonDriversResponse {
        try await self.client.execute(
            operation: "GetCostComparisonDrivers", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves key factors driving cost changes between two time periods within the last 13 months, such as usage changes, discount changes, and commitment-based savings. If you have enabled multi-year data at monthly granularity, you can go back up to 38 months.
    ///
    /// Parameters:
    ///   - baselineTimePeriod: The reference time period for comparison. This time period serves as the baseline against which other cost and usage data will be compared. The interval must start and end on the first day of a month, with a duration of exactly one month.
    ///   - billingViewArn: The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.
    ///   - comparisonTimePeriod: The comparison time period for analysis. This time period's cost and usage data will be compared against the baseline time period. The interval must start and end on the first day of a month, with a duration of exactly one month.
    ///   - filter: 
    ///   - groupBy: You can group results using the attributes DIMENSION, TAG, and COST_CATEGORY. Note that SERVICE and USAGE_TYPE dimensions are automatically included in the cost comparison drivers analysis.
    ///   - maxResults: The maximum number of results that are returned for the request.
    ///   - metricForComparison: The cost and usage metric to compare. Valid values are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.
    ///   - nextPageToken: The token to retrieve the next set of paginated results.
    ///   - logger: Logger use during operation
    @inlinable
    public func getCostComparisonDrivers(
        baselineTimePeriod: DateInterval,
        billingViewArn: String? = nil,
        comparisonTimePeriod: DateInterval,
        filter: Expression? = nil,
        groupBy: [GroupDefinition]? = nil,
        maxResults: Int? = nil,
        metricForComparison: String,
        nextPageToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetCostComparisonDriversResponse {
        let input = GetCostComparisonDriversRequest(
            baselineTimePeriod: baselineTimePeriod, 
            billingViewArn: billingViewArn, 
            comparisonTimePeriod: comparisonTimePeriod, 
            filter: filter, 
            groupBy: groupBy, 
            maxResults: maxResults, 
            metricForComparison: metricForComparison, 
            nextPageToken: nextPageToken
        )
        return try await self.getCostComparisonDrivers(input, logger: logger)
    }

    /// Retrieves a forecast for how much Amazon Web Services predicts that you will spend over the forecast time period that you select, based on your past costs.
    @Sendable
    @inlinable
    public func getCostForecast(_ input: GetCostForecastRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetCostForecastResponse {
        try await self.client.execute(
            operation: "GetCostForecast", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a forecast for how much Amazon Web Services predicts that you will spend over the forecast time period that you select, based on your past costs.
    ///
    /// Parameters:
    ///   - billingViewArn: The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.
    ///   - filter: The filters that you want to use to filter your forecast. The GetCostForecast API supports filtering by the following dimensions:    AZ     INSTANCE_TYPE     LINKED_ACCOUNT     OPERATION     PURCHASE_TYPE     REGION     SERVICE     USAGE_TYPE     USAGE_TYPE_GROUP     RECORD_TYPE     OPERATING_SYSTEM     TENANCY     SCOPE     PLATFORM     SUBSCRIPTION_ID     LEGAL_ENTITY_NAME     DEPLOYMENT_OPTION     DATABASE_ENGINE     INSTANCE_TYPE_FAMILY     BILLING_ENTITY     RESERVATION_ID     SAVINGS_PLAN_ARN
    ///   - granularity: How granular you want the forecast to be. You can get 3 months of DAILY forecasts or 12 months of MONTHLY forecasts. The GetCostForecast operation supports only DAILY and MONTHLY granularities.
    ///   - metric: Which metric Cost Explorer uses to create your forecast. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill?.  Valid values for a GetCostForecast call are the following:   AMORTIZED_COST   BLENDED_COST   NET_AMORTIZED_COST   NET_UNBLENDED_COST   UNBLENDED_COST
    ///   - predictionIntervalLevel: Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval around the mean by specifying a confidence level. The higher the confidence level, the more confident Cost Explorer is about the actual value falling in the prediction interval. Higher confidence levels result in wider prediction intervals.
    ///   - timePeriod: The period of time that you want the forecast to cover. The start date must be equal to or no later than the current date to avoid a validation error.
    ///   - logger: Logger use during operation
    @inlinable
    public func getCostForecast(
        billingViewArn: String? = nil,
        filter: Expression? = nil,
        granularity: Granularity,
        metric: Metric,
        predictionIntervalLevel: Int? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetCostForecastResponse {
        let input = GetCostForecastRequest(
            billingViewArn: billingViewArn, 
            filter: filter, 
            granularity: granularity, 
            metric: metric, 
            predictionIntervalLevel: predictionIntervalLevel, 
            timePeriod: timePeriod
        )
        return try await self.getCostForecast(input, logger: logger)
    }

    /// Retrieves all available filter values for a specified filter over a period of time. You can search the dimension values for an arbitrary string.
    @Sendable
    @inlinable
    public func getDimensionValues(_ input: GetDimensionValuesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDimensionValuesResponse {
        try await self.client.execute(
            operation: "GetDimensionValues", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves all available filter values for a specified filter over a period of time. You can search the dimension values for an arbitrary string.
    ///
    /// Parameters:
    ///   - billingViewArn: The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.
    ///   - context: The context for the call to GetDimensionValues. This can be RESERVATIONS or COST_AND_USAGE. The default value is COST_AND_USAGE. If the context is set to RESERVATIONS, the resulting dimension values can be used in the GetReservationUtilization operation. If the context is set to COST_AND_USAGE, the resulting dimension values can be used in the GetCostAndUsage operation. If you set the context to COST_AND_USAGE, you can use the following dimensions for searching:   AZ - The Availability Zone. An example is us-east-1a.   BILLING_ENTITY - The Amazon Web Services seller that your account is with. Possible values are the following: - Amazon Web Services(Amazon Web Services): The entity that sells Amazon Web Services services. - AISPL (Amazon Internet Services Pvt. Ltd.): The local Indian entity that's an acting reseller for Amazon Web Services services in India. - Amazon Web Services Marketplace: The entity that supports the sale of solutions that are built on Amazon Web Services by third-party software providers.   CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are Windows or Linux.   DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments. Valid values are SingleAZ and MultiAZ.   DATABASE_ENGINE - The Amazon Relational Database Service database. Examples are Aurora or MySQL.   INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge.   INSTANCE_TYPE_FAMILY - A family of instance types optimized to fit different use cases. Examples are Compute Optimized (for example, C4, C5, C6g, and C7g), Memory Optimization (for example, R4, R5n, R5b, and R6g).   INVOICING_ENTITY - The name of the entity that issues the Amazon Web Services invoice.   LEGAL_ENTITY_NAME - The name of the organization that sells you Amazon Web Services services, such as Amazon Web Services.   LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.   OPERATING_SYSTEM - The operating system. Examples are Windows or Linux.   OPERATION - The action performed. Examples include RunInstance and CreateBucket.   PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.   PURCHASE_TYPE - The reservation type of the purchase that this usage is related to. Examples include On-Demand Instances and Standard Reserved Instances.   RESERVATION_ID - The unique identifier for an Amazon Web Services Reservation Instance.   SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.   SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute).   SERVICE - The Amazon Web Services service such as Amazon DynamoDB.   TENANCY - The tenancy of a resource. Examples are shared or dedicated.   USAGE_TYPE - The type of usage. An example is DataTransfer-In-Bytes. The response for the GetDimensionValues operation includes a unit attribute. Examples include GB and Hrs.   USAGE_TYPE_GROUP - The grouping of common usage types. An example is Amazon EC2: CloudWatch – Alarms. The response for this operation includes a unit attribute.   REGION - The Amazon Web Services Region.   RECORD_TYPE - The different types of charges such as Reserved Instance (RI) fees, usage costs, tax refunds, and credits.   RESOURCE_ID - The unique identifier of the resource. ResourceId is an opt-in feature only available for last 14 days for EC2-Compute Service.   If you set the context to RESERVATIONS, you can use the following dimensions for searching:   AZ - The Availability Zone. An example is us-east-1a.   CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are Windows or Linux.   DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments. Valid values are SingleAZ and MultiAZ.   INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge.   LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.   PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.   REGION - The Amazon Web Services Region.   SCOPE (Utilization only) - The scope of a Reserved Instance (RI). Values are regional or a single Availability Zone.   TAG (Coverage only) - The tags that are associated with a Reserved Instance (RI).   TENANCY - The tenancy of a resource. Examples are shared or dedicated.   If you set the context to SAVINGS_PLANS, you can use the following dimensions for searching:   SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute)   PAYMENT_OPTION - The payment option for the given Savings Plans (for example, All Upfront)   REGION - The Amazon Web Services Region.   INSTANCE_TYPE_FAMILY - The family of instances (For example, m5)   LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.   SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.
    ///   - dimension: The name of the dimension. Each Dimension is available for a different Context. For more information, see Context. LINK_ACCOUNT_NAME and SERVICE_CODE can only be used in CostCategoryRule.
    ///   - filter: 
    ///   - maxResults: This field is only used when SortBy is provided in the request. The maximum number of objects that are returned for this request. If MaxResults isn't specified with SortBy, the request returns 1000 results as the default value for this parameter. For GetDimensionValues, MaxResults has an upper limit of 1000.
    ///   - nextPageToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - searchString: The value that you want to search the filter values for.
    ///   - sortBy: The value that you want to sort the data by. The key represents cost and usage metrics. The following values are supported:    BlendedCost     UnblendedCost     AmortizedCost     NetAmortizedCost     NetUnblendedCost     UsageQuantity     NormalizedUsageAmount    The supported values for the SortOrder key are ASCENDING or DESCENDING. When you specify a SortBy paramater, the context must be COST_AND_USAGE. Further, when using SortBy, NextPageToken and SearchString aren't supported.
    ///   - timePeriod: The start date and end date for retrieving the dimension values. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01.
    ///   - logger: Logger use during operation
    @inlinable
    public func getDimensionValues(
        billingViewArn: String? = nil,
        context: Context? = nil,
        dimension: Dimension,
        filter: Expression? = nil,
        maxResults: Int? = nil,
        nextPageToken: String? = nil,
        searchString: String? = nil,
        sortBy: [SortDefinition]? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDimensionValuesResponse {
        let input = GetDimensionValuesRequest(
            billingViewArn: billingViewArn, 
            context: context, 
            dimension: dimension, 
            filter: filter, 
            maxResults: maxResults, 
            nextPageToken: nextPageToken, 
            searchString: searchString, 
            sortBy: sortBy, 
            timePeriod: timePeriod
        )
        return try await self.getDimensionValues(input, logger: logger)
    }

    /// Retrieves the reservation coverage for your account, which you can use to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation. An organization's management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data about reservation usage by the following dimensions:   AZ   CACHE_ENGINE   DATABASE_ENGINE   DEPLOYMENT_OPTION   INSTANCE_TYPE   LINKED_ACCOUNT   OPERATING_SYSTEM   PLATFORM   REGION   SERVICE   TAG   TENANCY   To determine valid values for a dimension, use the GetDimensionValues operation.
    @Sendable
    @inlinable
    public func getReservationCoverage(_ input: GetReservationCoverageRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetReservationCoverageResponse {
        try await self.client.execute(
            operation: "GetReservationCoverage", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the reservation coverage for your account, which you can use to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation. An organization's management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data about reservation usage by the following dimensions:   AZ   CACHE_ENGINE   DATABASE_ENGINE   DEPLOYMENT_OPTION   INSTANCE_TYPE   LINKED_ACCOUNT   OPERATING_SYSTEM   PLATFORM   REGION   SERVICE   TAG   TENANCY   To determine valid values for a dimension, use the GetDimensionValues operation.
    ///
    /// Parameters:
    ///   - filter: Filters utilization data by dimensions. You can filter by the following dimensions:   AZ   CACHE_ENGINE   DATABASE_ENGINE   DEPLOYMENT_OPTION   INSTANCE_TYPE   LINKED_ACCOUNT   OPERATING_SYSTEM   PLATFORM   REGION   SERVICE   TAG   TENANCY    GetReservationCoverage uses the same Expression object as the other operations, but only AND is supported among each dimension. You can nest only one level deep. If there are multiple values for a dimension, they are OR'd together. If you don't provide a SERVICE filter, Cost Explorer defaults to EC2. Cost category is also supported.
    ///   - granularity: The granularity of the Amazon Web Services cost data for the reservation. Valid values are MONTHLY and DAILY. If GroupBy is set, Granularity can't be set. If Granularity isn't set, the response object doesn't include Granularity, either MONTHLY or DAILY. The GetReservationCoverage operation supports only DAILY and MONTHLY granularities.
    ///   - groupBy: You can group the data by the following attributes:   AZ   CACHE_ENGINE   DATABASE_ENGINE   DEPLOYMENT_OPTION   INSTANCE_TYPE   INVOICING_ENTITY   LINKED_ACCOUNT   OPERATING_SYSTEM   PLATFORM   REGION   TENANCY
    ///   - maxResults: The maximum number of objects that you returned for this request. If more objects are available, in the response, Amazon Web Services provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.
    ///   - metrics: The measurement that you want your reservation coverage reported in. Valid values are Hour, Unit, and Cost. You can use multiple values in a request.
    ///   - nextPageToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - sortBy: The value by which you want to sort the data. The following values are supported for Key:    OnDemandCost     CoverageHoursPercentage     OnDemandHours     ReservedHours     TotalRunningHours     CoverageNormalizedUnitsPercentage     OnDemandNormalizedUnits     ReservedNormalizedUnits     TotalRunningNormalizedUnits     Time    Supported values for SortOrder are ASCENDING or DESCENDING.
    ///   - timePeriod: The start and end dates of the period that you want to retrieve data about reservation coverage for. You can retrieve data for a maximum of 13 months: the last 12 months and the current month. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01.
    ///   - logger: Logger use during operation
    @inlinable
    public func getReservationCoverage(
        filter: Expression? = nil,
        granularity: Granularity? = nil,
        groupBy: [GroupDefinition]? = nil,
        maxResults: Int? = nil,
        metrics: [String]? = nil,
        nextPageToken: String? = nil,
        sortBy: SortDefinition? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetReservationCoverageResponse {
        let input = GetReservationCoverageRequest(
            filter: filter, 
            granularity: granularity, 
            groupBy: groupBy, 
            maxResults: maxResults, 
            metrics: metrics, 
            nextPageToken: nextPageToken, 
            sortBy: sortBy, 
            timePeriod: timePeriod
        )
        return try await self.getReservationCoverage(input, logger: logger)
    }

    /// Gets recommendations for reservation purchases. These recommendations might help you to reduce your costs. Reservations provide a discounted hourly rate (up to 75%) compared to On-Demand pricing. Amazon Web Services generates your recommendations by identifying your On-Demand usage during a specific time period and collecting your usage into categories that are eligible for a reservation. After Amazon Web Services has these categories, it simulates every combination of reservations in each category of usage to identify the best number of each type of Reserved Instance (RI) to purchase to maximize your estimated savings.  For example, Amazon Web Services automatically aggregates your Amazon EC2 Linux, shared tenancy, and c4 family usage in the US West (Oregon) Region and recommends that you buy size-flexible regional reservations to apply to the c4 family usage. Amazon Web Services recommends the smallest size instance in an instance family. This makes it easier to purchase a size-flexible Reserved Instance (RI). Amazon Web Services also shows the equal number of normalized units. This way, you can purchase any instance size that you want. For this example, your RI recommendation is for c4.large because that is the smallest size instance in the c4 instance family.
    @Sendable
    @inlinable
    public func getReservationPurchaseRecommendation(_ input: GetReservationPurchaseRecommendationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetReservationPurchaseRecommendationResponse {
        try await self.client.execute(
            operation: "GetReservationPurchaseRecommendation", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets recommendations for reservation purchases. These recommendations might help you to reduce your costs. Reservations provide a discounted hourly rate (up to 75%) compared to On-Demand pricing. Amazon Web Services generates your recommendations by identifying your On-Demand usage during a specific time period and collecting your usage into categories that are eligible for a reservation. After Amazon Web Services has these categories, it simulates every combination of reservations in each category of usage to identify the best number of each type of Reserved Instance (RI) to purchase to maximize your estimated savings.  For example, Amazon Web Services automatically aggregates your Amazon EC2 Linux, shared tenancy, and c4 family usage in the US West (Oregon) Region and recommends that you buy size-flexible regional reservations to apply to the c4 family usage. Amazon Web Services recommends the smallest size instance in an instance family. This makes it easier to purchase a size-flexible Reserved Instance (RI). Amazon Web Services also shows the equal number of normalized units. This way, you can purchase any instance size that you want. For this example, your RI recommendation is for c4.large because that is the smallest size instance in the c4 instance family.
    ///
    /// Parameters:
    ///   - accountId: The account ID that's associated with the recommendation.
    ///   - accountScope: The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the management account and member accounts if the value is set to PAYER. If the value is LINKED, recommendations are calculated for individual member accounts only.
    ///   - filter: 
    ///   - lookbackPeriodInDays: The number of previous days that you want Amazon Web Services to consider when it calculates your recommendations.
    ///   - nextPageToken: The pagination token that indicates the next set of results that you want to retrieve.
    ///   - pageSize: The number of recommendations that you want returned in a single response object.
    ///   - paymentOption: The reservation purchase option that you want recommendations for.
    ///   - service: The specific service that you want recommendations for.
    ///   - serviceSpecification: The hardware specifications for the service instances that you want recommendations for, such as standard or convertible Amazon EC2 instances.
    ///   - termInYears: The reservation term that you want recommendations for.
    ///   - logger: Logger use during operation
    @inlinable
    public func getReservationPurchaseRecommendation(
        accountId: String? = nil,
        accountScope: AccountScope? = nil,
        filter: Expression? = nil,
        lookbackPeriodInDays: LookbackPeriodInDays? = nil,
        nextPageToken: String? = nil,
        pageSize: Int? = nil,
        paymentOption: PaymentOption? = nil,
        service: String,
        serviceSpecification: ServiceSpecification? = nil,
        termInYears: TermInYears? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetReservationPurchaseRecommendationResponse {
        let input = GetReservationPurchaseRecommendationRequest(
            accountId: accountId, 
            accountScope: accountScope, 
            filter: filter, 
            lookbackPeriodInDays: lookbackPeriodInDays, 
            nextPageToken: nextPageToken, 
            pageSize: pageSize, 
            paymentOption: paymentOption, 
            service: service, 
            serviceSpecification: serviceSpecification, 
            termInYears: termInYears
        )
        return try await self.getReservationPurchaseRecommendation(input, logger: logger)
    }

    /// Retrieves the reservation utilization for your account. Management account in an organization have access to member accounts. You can filter data by dimensions in a time period. You can use GetDimensionValues to determine the possible dimension values. Currently, you can group only by SUBSCRIPTION_ID.
    @Sendable
    @inlinable
    public func getReservationUtilization(_ input: GetReservationUtilizationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetReservationUtilizationResponse {
        try await self.client.execute(
            operation: "GetReservationUtilization", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the reservation utilization for your account. Management account in an organization have access to member accounts. You can filter data by dimensions in a time period. You can use GetDimensionValues to determine the possible dimension values. Currently, you can group only by SUBSCRIPTION_ID.
    ///
    /// Parameters:
    ///   - filter: Filters utilization data by dimensions. You can filter by the following dimensions:   AZ   CACHE_ENGINE   DEPLOYMENT_OPTION   INSTANCE_TYPE   LINKED_ACCOUNT   OPERATING_SYSTEM   PLATFORM   REGION   SERVICE  If  not specified, the SERVICE filter defaults to Amazon Elastic Compute Cloud - Compute. Supported values for SERVICE are Amazon Elastic Compute Cloud - Compute, Amazon Relational Database Service, Amazon ElastiCache, Amazon Redshift, and Amazon Elasticsearch Service. The value for the SERVICE filter should not exceed "1".    SCOPE   TENANCY    GetReservationUtilization uses the same Expression object as the other operations, but only AND is supported among each dimension, and nesting is supported up to only one level deep. If there are multiple values for a dimension, they are OR'd together.
    ///   - granularity: If GroupBy is set, Granularity can't be set. If Granularity isn't set, the response object doesn't include Granularity, either MONTHLY or DAILY. If both GroupBy and Granularity aren't set, GetReservationUtilization defaults to DAILY. The GetReservationUtilization operation supports only DAILY and MONTHLY granularities.
    ///   - groupBy: Groups only by SUBSCRIPTION_ID. Metadata is included.
    ///   - maxResults: The maximum number of objects that you returned for this request. If more objects are available, in the response, Amazon Web Services provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.
    ///   - nextPageToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - sortBy: The value that you want to sort the data by. The following values are supported for Key:    UtilizationPercentage     UtilizationPercentageInUnits     PurchasedHours     PurchasedUnits     TotalActualHours     TotalActualUnits     UnusedHours     UnusedUnits     OnDemandCostOfRIHoursUsed     NetRISavings     TotalPotentialRISavings     AmortizedUpfrontFee     AmortizedRecurringFee     TotalAmortizedFee     RICostForUnusedHours     RealizedSavings     UnrealizedSavings    The supported values for SortOrder are ASCENDING and DESCENDING.
    ///   - timePeriod: Sets the start and end dates for retrieving Reserved Instance (RI) utilization. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01.
    ///   - logger: Logger use during operation
    @inlinable
    public func getReservationUtilization(
        filter: Expression? = nil,
        granularity: Granularity? = nil,
        groupBy: [GroupDefinition]? = nil,
        maxResults: Int? = nil,
        nextPageToken: String? = nil,
        sortBy: SortDefinition? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetReservationUtilizationResponse {
        let input = GetReservationUtilizationRequest(
            filter: filter, 
            granularity: granularity, 
            groupBy: groupBy, 
            maxResults: maxResults, 
            nextPageToken: nextPageToken, 
            sortBy: sortBy, 
            timePeriod: timePeriod
        )
        return try await self.getReservationUtilization(input, logger: logger)
    }

    /// Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances. Recommendations are generated to either downsize or terminate instances, along with providing savings detail and metrics. For more information about calculation and function, see Optimizing Your Cost with Rightsizing Recommendations in the Billing and Cost Management User Guide.
    @Sendable
    @inlinable
    public func getRightsizingRecommendation(_ input: GetRightsizingRecommendationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetRightsizingRecommendationResponse {
        try await self.client.execute(
            operation: "GetRightsizingRecommendation", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances. Recommendations are generated to either downsize or terminate instances, along with providing savings detail and metrics. For more information about calculation and function, see Optimizing Your Cost with Rightsizing Recommendations in the Billing and Cost Management User Guide.
    ///
    /// Parameters:
    ///   - configuration: You can use Configuration to customize recommendations across two attributes. You can choose to view recommendations for instances within the same instance families or across different instance families. You can also choose to view your estimated savings that are associated with recommendations with consideration of existing Savings Plans or RI benefits, or neither.
    ///   - filter: 
    ///   - nextPageToken: The pagination token that indicates the next set of results that you want to retrieve.
    ///   - pageSize: The number of recommendations that you want returned in a single response object.
    ///   - service: The specific service that you want recommendations for. The only valid value for GetRightsizingRecommendation is "AmazonEC2".
    ///   - logger: Logger use during operation
    @inlinable
    public func getRightsizingRecommendation(
        configuration: RightsizingRecommendationConfiguration? = nil,
        filter: Expression? = nil,
        nextPageToken: String? = nil,
        pageSize: Int? = nil,
        service: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetRightsizingRecommendationResponse {
        let input = GetRightsizingRecommendationRequest(
            configuration: configuration, 
            filter: filter, 
            nextPageToken: nextPageToken, 
            pageSize: pageSize, 
            service: service
        )
        return try await self.getRightsizingRecommendation(input, logger: logger)
    }

    /// Retrieves the details for a Savings Plan recommendation. These details include the hourly data-points that construct the cost, coverage, and utilization charts.
    @Sendable
    @inlinable
    public func getSavingsPlanPurchaseRecommendationDetails(_ input: GetSavingsPlanPurchaseRecommendationDetailsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetSavingsPlanPurchaseRecommendationDetailsResponse {
        try await self.client.execute(
            operation: "GetSavingsPlanPurchaseRecommendationDetails", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the details for a Savings Plan recommendation. These details include the hourly data-points that construct the cost, coverage, and utilization charts.
    ///
    /// Parameters:
    ///   - recommendationDetailId: The ID that is associated with the Savings Plan recommendation.
    ///   - logger: Logger use during operation
    @inlinable
    public func getSavingsPlanPurchaseRecommendationDetails(
        recommendationDetailId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetSavingsPlanPurchaseRecommendationDetailsResponse {
        let input = GetSavingsPlanPurchaseRecommendationDetailsRequest(
            recommendationDetailId: recommendationDetailId
        )
        return try await self.getSavingsPlanPurchaseRecommendationDetails(input, logger: logger)
    }

    /// Retrieves the Savings Plans covered for your account. This enables you to see how much of your cost is covered by a Savings Plan. An organization’s management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data for Savings Plans usage with the following dimensions:    LINKED_ACCOUNT     REGION     SERVICE     INSTANCE_FAMILY    To determine valid values for a dimension, use the GetDimensionValues operation.
    @Sendable
    @inlinable
    public func getSavingsPlansCoverage(_ input: GetSavingsPlansCoverageRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetSavingsPlansCoverageResponse {
        try await self.client.execute(
            operation: "GetSavingsPlansCoverage", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the Savings Plans covered for your account. This enables you to see how much of your cost is covered by a Savings Plan. An organization’s management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data for Savings Plans usage with the following dimensions:    LINKED_ACCOUNT     REGION     SERVICE     INSTANCE_FAMILY    To determine valid values for a dimension, use the GetDimensionValues operation.
    ///
    /// Parameters:
    ///   - filter: Filters Savings Plans coverage data by dimensions. You can filter data for Savings Plans usage with the following dimensions:    LINKED_ACCOUNT     REGION     SERVICE     INSTANCE_FAMILY     GetSavingsPlansCoverage uses the same Expression object as the other operations, but only AND is supported among each dimension. If there are multiple values for a dimension, they are OR'd together. Cost category is also supported.
    ///   - granularity: The granularity of the Amazon Web Services cost data for your Savings Plans. Granularity can't be set if GroupBy is set. The GetSavingsPlansCoverage operation supports only DAILY and MONTHLY granularities.
    ///   - groupBy: You can group the data using the attributes INSTANCE_FAMILY, REGION, or SERVICE.
    ///   - maxResults: The number of items to be returned in a response. The default is 20, with a minimum value of 1.
    ///   - metrics: The measurement that you want your Savings Plans coverage reported in. The only valid value is SpendCoveredBySavingsPlans.
    ///   - nextToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - sortBy: The value that you want to sort the data by. The following values are supported for Key:    SpendCoveredBySavingsPlan     OnDemandCost     CoveragePercentage     TotalCost     InstanceFamily     Region     Service    The supported values for SortOrder are ASCENDING and DESCENDING.
    ///   - timePeriod: The time period that you want the usage and costs for. The Start date must be within 13 months. The End date must be after the Start date, and before the current date. Future dates can't be used as an End date.
    ///   - logger: Logger use during operation
    @inlinable
    public func getSavingsPlansCoverage(
        filter: Expression? = nil,
        granularity: Granularity? = nil,
        groupBy: [GroupDefinition]? = nil,
        maxResults: Int? = nil,
        metrics: [String]? = nil,
        nextToken: String? = nil,
        sortBy: SortDefinition? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetSavingsPlansCoverageResponse {
        let input = GetSavingsPlansCoverageRequest(
            filter: filter, 
            granularity: granularity, 
            groupBy: groupBy, 
            maxResults: maxResults, 
            metrics: metrics, 
            nextToken: nextToken, 
            sortBy: sortBy, 
            timePeriod: timePeriod
        )
        return try await self.getSavingsPlansCoverage(input, logger: logger)
    }

    /// Retrieves the Savings Plans recommendations for your account. First use StartSavingsPlansPurchaseRecommendationGeneration to generate a new set of recommendations, and then use GetSavingsPlansPurchaseRecommendation to retrieve them.
    @Sendable
    @inlinable
    public func getSavingsPlansPurchaseRecommendation(_ input: GetSavingsPlansPurchaseRecommendationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetSavingsPlansPurchaseRecommendationResponse {
        try await self.client.execute(
            operation: "GetSavingsPlansPurchaseRecommendation", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the Savings Plans recommendations for your account. First use StartSavingsPlansPurchaseRecommendationGeneration to generate a new set of recommendations, and then use GetSavingsPlansPurchaseRecommendation to retrieve them.
    ///
    /// Parameters:
    ///   - accountScope: The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the management account and member accounts if the value is set to PAYER. If the value is LINKED, recommendations are calculated for individual member accounts only.
    ///   - filter: You can filter your recommendations by Account ID with the LINKED_ACCOUNT dimension. To filter your recommendations by Account ID, specify Key as LINKED_ACCOUNT and Value as the comma-separated Acount ID(s) that you want to see Savings Plans purchase recommendations for. For GetSavingsPlansPurchaseRecommendation, the Filter doesn't include CostCategories or Tags. It only includes Dimensions. With Dimensions, Key must be LINKED_ACCOUNT and Value can be a single Account ID or multiple comma-separated Account IDs that you want to see Savings Plans Purchase Recommendations for. AND and OR operators are not supported.
    ///   - lookbackPeriodInDays: The lookback period that's used to generate the recommendation.
    ///   - nextPageToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - pageSize: The number of recommendations that you want returned in a single response object.
    ///   - paymentOption: The payment option that's used to generate these recommendations.
    ///   - savingsPlansType: The Savings Plans recommendation type that's requested.
    ///   - termInYears: The savings plan recommendation term that's used to generate these recommendations.
    ///   - logger: Logger use during operation
    @inlinable
    public func getSavingsPlansPurchaseRecommendation(
        accountScope: AccountScope? = nil,
        filter: Expression? = nil,
        lookbackPeriodInDays: LookbackPeriodInDays,
        nextPageToken: String? = nil,
        pageSize: Int? = nil,
        paymentOption: PaymentOption,
        savingsPlansType: SupportedSavingsPlansType,
        termInYears: TermInYears,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetSavingsPlansPurchaseRecommendationResponse {
        let input = GetSavingsPlansPurchaseRecommendationRequest(
            accountScope: accountScope, 
            filter: filter, 
            lookbackPeriodInDays: lookbackPeriodInDays, 
            nextPageToken: nextPageToken, 
            pageSize: pageSize, 
            paymentOption: paymentOption, 
            savingsPlansType: savingsPlansType, 
            termInYears: termInYears
        )
        return try await self.getSavingsPlansPurchaseRecommendation(input, logger: logger)
    }

    /// Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity. Management account in an organization have access to member accounts. You can use GetDimensionValues in SAVINGS_PLANS to determine the possible dimension values.  You can't group by any dimension values for GetSavingsPlansUtilization.
    @Sendable
    @inlinable
    public func getSavingsPlansUtilization(_ input: GetSavingsPlansUtilizationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetSavingsPlansUtilizationResponse {
        try await self.client.execute(
            operation: "GetSavingsPlansUtilization", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity. Management account in an organization have access to member accounts. You can use GetDimensionValues in SAVINGS_PLANS to determine the possible dimension values.  You can't group by any dimension values for GetSavingsPlansUtilization.
    ///
    /// Parameters:
    ///   - filter: Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the following dimensions:    LINKED_ACCOUNT     SAVINGS_PLAN_ARN     SAVINGS_PLANS_TYPE     REGION     PAYMENT_OPTION     INSTANCE_TYPE_FAMILY     GetSavingsPlansUtilization uses the same Expression object as the other operations, but only AND is supported among each dimension.
    ///   - granularity: The granularity of the Amazon Web Services utillization data for your Savings Plans. The GetSavingsPlansUtilization operation supports only DAILY and MONTHLY granularities.
    ///   - sortBy: The value that you want to sort the data by. The following values are supported for Key:    UtilizationPercentage     TotalCommitment     UsedCommitment     UnusedCommitment     NetSavings    The supported values for SortOrder are ASCENDING and DESCENDING.
    ///   - timePeriod: The time period that you want the usage and costs for. The Start date must be within 13 months. The End date must be after the Start date, and before the current date. Future dates can't be used as an End date.
    ///   - logger: Logger use during operation
    @inlinable
    public func getSavingsPlansUtilization(
        filter: Expression? = nil,
        granularity: Granularity? = nil,
        sortBy: SortDefinition? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetSavingsPlansUtilizationResponse {
        let input = GetSavingsPlansUtilizationRequest(
            filter: filter, 
            granularity: granularity, 
            sortBy: sortBy, 
            timePeriod: timePeriod
        )
        return try await self.getSavingsPlansUtilization(input, logger: logger)
    }

    /// Retrieves attribute data along with aggregate utilization and savings data for a given time period. This doesn't support granular or grouped data (daily/monthly) in response. You can't retrieve data by dates in a single response similar to GetSavingsPlanUtilization, but you have the option to make multiple calls to GetSavingsPlanUtilizationDetails by providing individual dates. You can use GetDimensionValues in SAVINGS_PLANS to determine the possible dimension values.   GetSavingsPlanUtilizationDetails internally groups data by SavingsPlansArn.
    @Sendable
    @inlinable
    public func getSavingsPlansUtilizationDetails(_ input: GetSavingsPlansUtilizationDetailsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetSavingsPlansUtilizationDetailsResponse {
        try await self.client.execute(
            operation: "GetSavingsPlansUtilizationDetails", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves attribute data along with aggregate utilization and savings data for a given time period. This doesn't support granular or grouped data (daily/monthly) in response. You can't retrieve data by dates in a single response similar to GetSavingsPlanUtilization, but you have the option to make multiple calls to GetSavingsPlanUtilizationDetails by providing individual dates. You can use GetDimensionValues in SAVINGS_PLANS to determine the possible dimension values.   GetSavingsPlanUtilizationDetails internally groups data by SavingsPlansArn.
    ///
    /// Parameters:
    ///   - dataType: The data type.
    ///   - filter: Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the following dimensions:    LINKED_ACCOUNT     SAVINGS_PLAN_ARN     REGION     PAYMENT_OPTION     INSTANCE_TYPE_FAMILY     GetSavingsPlansUtilizationDetails uses the same Expression object as the other operations, but only AND is supported among each dimension.
    ///   - maxResults: The number of items to be returned in a response. The default is 20, with a minimum value of 1.
    ///   - nextToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - sortBy: The value that you want to sort the data by. The following values are supported for Key:    UtilizationPercentage     TotalCommitment     UsedCommitment     UnusedCommitment     NetSavings     AmortizedRecurringCommitment     AmortizedUpfrontCommitment    The supported values for SortOrder are ASCENDING and DESCENDING.
    ///   - timePeriod: The time period that you want the usage and costs for. The Start date must be within 13 months. The End date must be after the Start date, and before the current date. Future dates can't be used as an End date.
    ///   - logger: Logger use during operation
    @inlinable
    public func getSavingsPlansUtilizationDetails(
        dataType: [SavingsPlansDataType]? = nil,
        filter: Expression? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        sortBy: SortDefinition? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetSavingsPlansUtilizationDetailsResponse {
        let input = GetSavingsPlansUtilizationDetailsRequest(
            dataType: dataType, 
            filter: filter, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            sortBy: sortBy, 
            timePeriod: timePeriod
        )
        return try await self.getSavingsPlansUtilizationDetails(input, logger: logger)
    }

    /// Queries for available tag keys and tag values for a specified period. You can search the tag values for an arbitrary string.
    @Sendable
    @inlinable
    public func getTags(_ input: GetTagsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetTagsResponse {
        try await self.client.execute(
            operation: "GetTags", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Queries for available tag keys and tag values for a specified period. You can search the tag values for an arbitrary string.
    ///
    /// Parameters:
    ///   - billingViewArn: The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.
    ///   - filter: 
    ///   - maxResults: This field is only used when SortBy is provided in the request. The maximum number of objects that are returned for this request. If MaxResults isn't specified with SortBy, the request returns 1000 results as the default value for this parameter. For GetTags, MaxResults has an upper quota of 1000.
    ///   - nextPageToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - searchString: The value that you want to search for.
    ///   - sortBy: The value that you want to sort the data by. The key represents cost and usage metrics. The following values are supported:    BlendedCost     UnblendedCost     AmortizedCost     NetAmortizedCost     NetUnblendedCost     UsageQuantity     NormalizedUsageAmount    The supported values for SortOrder are ASCENDING and DESCENDING. When you use SortBy, NextPageToken and SearchString aren't supported.
    ///   - tagKey: The key of the tag that you want to return values for.
    ///   - timePeriod: The start and end dates for retrieving the dimension values. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01.
    ///   - logger: Logger use during operation
    @inlinable
    public func getTags(
        billingViewArn: String? = nil,
        filter: Expression? = nil,
        maxResults: Int? = nil,
        nextPageToken: String? = nil,
        searchString: String? = nil,
        sortBy: [SortDefinition]? = nil,
        tagKey: String? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetTagsResponse {
        let input = GetTagsRequest(
            billingViewArn: billingViewArn, 
            filter: filter, 
            maxResults: maxResults, 
            nextPageToken: nextPageToken, 
            searchString: searchString, 
            sortBy: sortBy, 
            tagKey: tagKey, 
            timePeriod: timePeriod
        )
        return try await self.getTags(input, logger: logger)
    }

    /// Retrieves a forecast for how much Amazon Web Services predicts that you will use over the forecast time period that you select, based on your past usage.
    @Sendable
    @inlinable
    public func getUsageForecast(_ input: GetUsageForecastRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetUsageForecastResponse {
        try await self.client.execute(
            operation: "GetUsageForecast", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a forecast for how much Amazon Web Services predicts that you will use over the forecast time period that you select, based on your past usage.
    ///
    /// Parameters:
    ///   - billingViewArn: The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.
    ///   - filter: The filters that you want to use to filter your forecast. The GetUsageForecast API supports filtering by the following dimensions:    AZ     INSTANCE_TYPE     LINKED_ACCOUNT     LINKED_ACCOUNT_NAME     OPERATION     PURCHASE_TYPE     REGION     SERVICE     USAGE_TYPE     USAGE_TYPE_GROUP     RECORD_TYPE     OPERATING_SYSTEM     TENANCY     SCOPE     PLATFORM     SUBSCRIPTION_ID     LEGAL_ENTITY_NAME     DEPLOYMENT_OPTION     DATABASE_ENGINE     INSTANCE_TYPE_FAMILY     BILLING_ENTITY     RESERVATION_ID     SAVINGS_PLAN_ARN
    ///   - granularity: How granular you want the forecast to be. You can get 3 months of DAILY forecasts or 12 months of MONTHLY forecasts. The GetUsageForecast operation supports only DAILY and MONTHLY granularities.
    ///   - metric: Which metric Cost Explorer uses to create your forecast. Valid values for a GetUsageForecast call are the following:   USAGE_QUANTITY   NORMALIZED_USAGE_AMOUNT
    ///   - predictionIntervalLevel: Amazon Web Services Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval around the mean by specifying a confidence level. The higher the confidence level, the more confident Cost Explorer is about the actual value falling in the prediction interval. Higher confidence levels result in wider prediction intervals.
    ///   - timePeriod: The start and end dates of the period that you want to retrieve usage forecast for. The start date is included in the period, but the end date isn't included in the period. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01. The start date must be equal to or later than the current date to avoid a validation error.
    ///   - logger: Logger use during operation
    @inlinable
    public func getUsageForecast(
        billingViewArn: String? = nil,
        filter: Expression? = nil,
        granularity: Granularity,
        metric: Metric,
        predictionIntervalLevel: Int? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetUsageForecastResponse {
        let input = GetUsageForecastRequest(
            billingViewArn: billingViewArn, 
            filter: filter, 
            granularity: granularity, 
            metric: metric, 
            predictionIntervalLevel: predictionIntervalLevel, 
            timePeriod: timePeriod
        )
        return try await self.getUsageForecast(input, logger: logger)
    }

    /// Lists the commitment purchase analyses for your account.
    @Sendable
    @inlinable
    public func listCommitmentPurchaseAnalyses(_ input: ListCommitmentPurchaseAnalysesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListCommitmentPurchaseAnalysesResponse {
        try await self.client.execute(
            operation: "ListCommitmentPurchaseAnalyses", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the commitment purchase analyses for your account.
    ///
    /// Parameters:
    ///   - analysisIds: The analysis IDs associated with the commitment purchase analyses.
    ///   - analysisStatus: The status of the analysis.
    ///   - nextPageToken: The token to retrieve the next set of results.
    ///   - pageSize: The number of analyses that you want returned in a single response object.
    ///   - logger: Logger use during operation
    @inlinable
    public func listCommitmentPurchaseAnalyses(
        analysisIds: [String]? = nil,
        analysisStatus: AnalysisStatus? = nil,
        nextPageToken: String? = nil,
        pageSize: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListCommitmentPurchaseAnalysesResponse {
        let input = ListCommitmentPurchaseAnalysesRequest(
            analysisIds: analysisIds, 
            analysisStatus: analysisStatus, 
            nextPageToken: nextPageToken, 
            pageSize: pageSize
        )
        return try await self.listCommitmentPurchaseAnalyses(input, logger: logger)
    }

    ///  Retrieves a list of your historical cost allocation tag backfill requests.
    @Sendable
    @inlinable
    public func listCostAllocationTagBackfillHistory(_ input: ListCostAllocationTagBackfillHistoryRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListCostAllocationTagBackfillHistoryResponse {
        try await self.client.execute(
            operation: "ListCostAllocationTagBackfillHistory", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves a list of your historical cost allocation tag backfill requests.
    ///
    /// Parameters:
    ///   - maxResults:  The maximum number of objects that are returned for this request.
    ///   - nextToken:  The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - logger: Logger use during operation
    @inlinable
    public func listCostAllocationTagBackfillHistory(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListCostAllocationTagBackfillHistoryResponse {
        let input = ListCostAllocationTagBackfillHistoryRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listCostAllocationTagBackfillHistory(input, logger: logger)
    }

    /// Get a list of cost allocation tags. All inputs in the API are optional and serve as filters. By default, all cost allocation tags are returned.
    @Sendable
    @inlinable
    public func listCostAllocationTags(_ input: ListCostAllocationTagsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListCostAllocationTagsResponse {
        try await self.client.execute(
            operation: "ListCostAllocationTags", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Get a list of cost allocation tags. All inputs in the API are optional and serve as filters. By default, all cost allocation tags are returned.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of objects that are returned for this request. By default, the request returns 100 results.
    ///   - nextToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - status: The status of cost allocation tag keys that are returned for this request.
    ///   - tagKeys: The list of cost allocation tag keys that are returned for this request.
    ///   - type: The type of CostAllocationTag object that are returned for this request. The AWSGenerated type tags are tags that Amazon Web Services defines and applies to support Amazon Web Services resources for cost allocation purposes. The UserDefined type tags are tags that you define, create, and apply to resources.
    ///   - logger: Logger use during operation
    @inlinable
    public func listCostAllocationTags(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        status: CostAllocationTagStatus? = nil,
        tagKeys: [String]? = nil,
        type: CostAllocationTagType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListCostAllocationTagsResponse {
        let input = ListCostAllocationTagsRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            status: status, 
            tagKeys: tagKeys, 
            type: type
        )
        return try await self.listCostAllocationTags(input, logger: logger)
    }

    /// Returns the name, Amazon Resource Name (ARN), NumberOfRules and effective dates of all Cost Categories defined in the account. You have the option to use EffectiveOn to return a list of Cost Categories that were active on a specific date. If there is no EffectiveOn specified, you’ll see Cost Categories that are effective on the current date. If Cost Category is still effective, EffectiveEnd is omitted in the response. ListCostCategoryDefinitions supports pagination. The request can have a MaxResults range up to 100.
    @Sendable
    @inlinable
    public func listCostCategoryDefinitions(_ input: ListCostCategoryDefinitionsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListCostCategoryDefinitionsResponse {
        try await self.client.execute(
            operation: "ListCostCategoryDefinitions", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the name, Amazon Resource Name (ARN), NumberOfRules and effective dates of all Cost Categories defined in the account. You have the option to use EffectiveOn to return a list of Cost Categories that were active on a specific date. If there is no EffectiveOn specified, you’ll see Cost Categories that are effective on the current date. If Cost Category is still effective, EffectiveEnd is omitted in the response. ListCostCategoryDefinitions supports pagination. The request can have a MaxResults range up to 100.
    ///
    /// Parameters:
    ///   - effectiveOn: The date when the Cost Category was effective.
    ///   - maxResults: The number of entries a paginated response contains.
    ///   - nextToken: The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
    ///   - logger: Logger use during operation
    @inlinable
    public func listCostCategoryDefinitions(
        effectiveOn: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListCostCategoryDefinitionsResponse {
        let input = ListCostCategoryDefinitionsRequest(
            effectiveOn: effectiveOn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listCostCategoryDefinitions(input, logger: logger)
    }

    /// Retrieves a list of your historical recommendation generations within the past 30 days.
    @Sendable
    @inlinable
    public func listSavingsPlansPurchaseRecommendationGeneration(_ input: ListSavingsPlansPurchaseRecommendationGenerationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListSavingsPlansPurchaseRecommendationGenerationResponse {
        try await self.client.execute(
            operation: "ListSavingsPlansPurchaseRecommendationGeneration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a list of your historical recommendation generations within the past 30 days.
    ///
    /// Parameters:
    ///   - generationStatus: The status of the recommendation generation.
    ///   - nextPageToken: The token to retrieve the next set of results.
    ///   - pageSize: The number of recommendations that you want returned in a single response object.
    ///   - recommendationIds: The IDs for each specific recommendation.
    ///   - logger: Logger use during operation
    @inlinable
    public func listSavingsPlansPurchaseRecommendationGeneration(
        generationStatus: GenerationStatus? = nil,
        nextPageToken: String? = nil,
        pageSize: Int? = nil,
        recommendationIds: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListSavingsPlansPurchaseRecommendationGenerationResponse {
        let input = ListSavingsPlansPurchaseRecommendationGenerationRequest(
            generationStatus: generationStatus, 
            nextPageToken: nextPageToken, 
            pageSize: pageSize, 
            recommendationIds: recommendationIds
        )
        return try await self.listSavingsPlansPurchaseRecommendationGeneration(input, logger: logger)
    }

    /// Returns a list of resource tags associated with the resource specified by the Amazon Resource Name (ARN).
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of resource tags associated with the resource specified by the Amazon Resource Name (ARN).
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource. For a list of supported resources, see ResourceTag.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Modifies the feedback property of a given cost anomaly.
    @Sendable
    @inlinable
    public func provideAnomalyFeedback(_ input: ProvideAnomalyFeedbackRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ProvideAnomalyFeedbackResponse {
        try await self.client.execute(
            operation: "ProvideAnomalyFeedback", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Modifies the feedback property of a given cost anomaly.
    ///
    /// Parameters:
    ///   - anomalyId: A cost anomaly ID.
    ///   - feedback: Describes whether the cost anomaly was a planned activity or you considered it an anomaly.
    ///   - logger: Logger use during operation
    @inlinable
    public func provideAnomalyFeedback(
        anomalyId: String,
        feedback: AnomalyFeedbackType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ProvideAnomalyFeedbackResponse {
        let input = ProvideAnomalyFeedbackRequest(
            anomalyId: anomalyId, 
            feedback: feedback
        )
        return try await self.provideAnomalyFeedback(input, logger: logger)
    }

    /// Specifies the parameters of a planned commitment purchase and starts the generation of the analysis. This enables you to estimate the cost, coverage, and utilization impact of your planned commitment purchases.
    @Sendable
    @inlinable
    public func startCommitmentPurchaseAnalysis(_ input: StartCommitmentPurchaseAnalysisRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartCommitmentPurchaseAnalysisResponse {
        try await self.client.execute(
            operation: "StartCommitmentPurchaseAnalysis", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Specifies the parameters of a planned commitment purchase and starts the generation of the analysis. This enables you to estimate the cost, coverage, and utilization impact of your planned commitment purchases.
    ///
    /// Parameters:
    ///   - commitmentPurchaseAnalysisConfiguration: The configuration for the commitment purchase analysis.
    ///   - logger: Logger use during operation
    @inlinable
    public func startCommitmentPurchaseAnalysis(
        commitmentPurchaseAnalysisConfiguration: CommitmentPurchaseAnalysisConfiguration,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartCommitmentPurchaseAnalysisResponse {
        let input = StartCommitmentPurchaseAnalysisRequest(
            commitmentPurchaseAnalysisConfiguration: commitmentPurchaseAnalysisConfiguration
        )
        return try await self.startCommitmentPurchaseAnalysis(input, logger: logger)
    }

    ///  Request a cost allocation tag backfill. This will backfill the activation status (either active or inactive) for all tag keys from para:BackfillFrom up to the time this request is made. You can request a backfill once every 24 hours.
    @Sendable
    @inlinable
    public func startCostAllocationTagBackfill(_ input: StartCostAllocationTagBackfillRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartCostAllocationTagBackfillResponse {
        try await self.client.execute(
            operation: "StartCostAllocationTagBackfill", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Request a cost allocation tag backfill. This will backfill the activation status (either active or inactive) for all tag keys from para:BackfillFrom up to the time this request is made. You can request a backfill once every 24 hours.
    ///
    /// Parameters:
    ///   - backfillFrom:  The date you want the backfill to start from. The date can only be a first day of the month (a billing start date). Dates can't precede the previous twelve months, or in the future.
    ///   - logger: Logger use during operation
    @inlinable
    public func startCostAllocationTagBackfill(
        backfillFrom: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartCostAllocationTagBackfillResponse {
        let input = StartCostAllocationTagBackfillRequest(
            backfillFrom: backfillFrom
        )
        return try await self.startCostAllocationTagBackfill(input, logger: logger)
    }

    /// Requests a Savings Plans recommendation generation. This enables you to calculate a fresh set of Savings Plans recommendations that takes your latest usage data and current Savings Plans inventory into account. You can refresh Savings Plans recommendations up to three times daily for a consolidated billing family.   StartSavingsPlansPurchaseRecommendationGeneration has no request syntax because no input parameters are needed to support this operation.
    @Sendable
    @inlinable
    public func startSavingsPlansPurchaseRecommendationGeneration(_ input: StartSavingsPlansPurchaseRecommendationGenerationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartSavingsPlansPurchaseRecommendationGenerationResponse {
        try await self.client.execute(
            operation: "StartSavingsPlansPurchaseRecommendationGeneration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Requests a Savings Plans recommendation generation. This enables you to calculate a fresh set of Savings Plans recommendations that takes your latest usage data and current Savings Plans inventory into account. You can refresh Savings Plans recommendations up to three times daily for a consolidated billing family.   StartSavingsPlansPurchaseRecommendationGeneration has no request syntax because no input parameters are needed to support this operation.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func startSavingsPlansPurchaseRecommendationGeneration(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartSavingsPlansPurchaseRecommendationGenerationResponse {
        let input = StartSavingsPlansPurchaseRecommendationGenerationRequest(
        )
        return try await self.startSavingsPlansPurchaseRecommendationGeneration(input, logger: logger)
    }

    /// An API operation for adding one or more tags (key-value pairs) to a resource. You can use the TagResource operation with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value you specify replaces the previous value for that tag. Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// An API operation for adding one or more tags (key-value pairs) to a resource. You can use the TagResource operation with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value you specify replaces the previous value for that tag. Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource. For a list of supported resources, see ResourceTag.
    ///   - resourceTags:  A list of tag key-value pairs to be added to the resource. Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:   Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services use   The maximum length of a key is 128 characters   The maximum length of a value is 256 characters   Keys and values can only contain alphanumeric characters, spaces, and any of the following: _.:/=+@-    Keys and values are case sensitive   Keys and values are trimmed for any leading or trailing whitespaces   Don’t use aws: as a prefix for your keys. This prefix is reserved for Amazon Web Services use
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        resourceTags: [ResourceTag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            resourceTags: resourceTags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource. For a list of supported resources, see ResourceTag.
    ///   - resourceTagKeys: A list of tag keys associated with tags that need to be removed from the resource. If you specify a tag key that doesn't exist, it's ignored. Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        resourceTagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            resourceTagKeys: resourceTagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates an existing cost anomaly monitor. The changes made are applied going forward, and doesn't change anomalies detected in the past.
    @Sendable
    @inlinable
    public func updateAnomalyMonitor(_ input: UpdateAnomalyMonitorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateAnomalyMonitorResponse {
        try await self.client.execute(
            operation: "UpdateAnomalyMonitor", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates an existing cost anomaly monitor. The changes made are applied going forward, and doesn't change anomalies detected in the past.
    ///
    /// Parameters:
    ///   - monitorArn: Cost anomaly monitor Amazon Resource Names (ARNs).
    ///   - monitorName: The new name for the cost anomaly monitor.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateAnomalyMonitor(
        monitorArn: String,
        monitorName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateAnomalyMonitorResponse {
        let input = UpdateAnomalyMonitorRequest(
            monitorArn: monitorArn, 
            monitorName: monitorName
        )
        return try await self.updateAnomalyMonitor(input, logger: logger)
    }

    /// Updates an existing cost anomaly subscription. Specify the fields that you want to update. Omitted fields are unchanged.  The JSON below describes the generic construct for each type. See Request Parameters for possible values as they apply to AnomalySubscription.
    @Sendable
    @inlinable
    public func updateAnomalySubscription(_ input: UpdateAnomalySubscriptionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateAnomalySubscriptionResponse {
        try await self.client.execute(
            operation: "UpdateAnomalySubscription", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates an existing cost anomaly subscription. Specify the fields that you want to update. Omitted fields are unchanged.  The JSON below describes the generic construct for each type. See Request Parameters for possible values as they apply to AnomalySubscription.
    ///
    /// Parameters:
    ///   - frequency: The update to the frequency value that subscribers receive notifications.
    ///   - monitorArnList: A list of cost anomaly monitor ARNs.
    ///   - subscribers: The update to the subscriber list.
    ///   - subscriptionArn: A cost anomaly subscription Amazon Resource Name (ARN).
    ///   - subscriptionName: The new name of the subscription.
    ///   - thresholdExpression: The update to the Expression object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions are ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types are AND and OR. The match option GREATER_THAN_OR_EQUAL is required. Values must be numbers between 0 and 10,000,000,000 in string format. You can specify either Threshold or ThresholdExpression, but not both. The following are examples of valid ThresholdExpressions:   Absolute threshold: { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }    Percentage threshold: { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }     AND two thresholds together: { "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }     OR two thresholds together: { "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
    ///   - logger: Logger use during operation
    @inlinable
    public func updateAnomalySubscription(
        frequency: AnomalySubscriptionFrequency? = nil,
        monitorArnList: [String]? = nil,
        subscribers: [Subscriber]? = nil,
        subscriptionArn: String,
        subscriptionName: String? = nil,
        thresholdExpression: Expression? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateAnomalySubscriptionResponse {
        let input = UpdateAnomalySubscriptionRequest(
            frequency: frequency, 
            monitorArnList: monitorArnList, 
            subscribers: subscribers, 
            subscriptionArn: subscriptionArn, 
            subscriptionName: subscriptionName, 
            thresholdExpression: thresholdExpression
        )
        return try await self.updateAnomalySubscription(input, logger: logger)
    }

    /// Updates status for cost allocation tags in bulk, with maximum batch size of 20. If the tag status that's updated is the same as the existing tag status, the request doesn't fail. Instead, it doesn't have any effect on the tag status (for example, activating the active tag).
    @Sendable
    @inlinable
    public func updateCostAllocationTagsStatus(_ input: UpdateCostAllocationTagsStatusRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateCostAllocationTagsStatusResponse {
        try await self.client.execute(
            operation: "UpdateCostAllocationTagsStatus", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates status for cost allocation tags in bulk, with maximum batch size of 20. If the tag status that's updated is the same as the existing tag status, the request doesn't fail. Instead, it doesn't have any effect on the tag status (for example, activating the active tag).
    ///
    /// Parameters:
    ///   - costAllocationTagsStatus: The list of CostAllocationTagStatusEntry objects that are used to update cost allocation tags status for this request.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateCostAllocationTagsStatus(
        costAllocationTagsStatus: [CostAllocationTagStatusEntry],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateCostAllocationTagsStatusResponse {
        let input = UpdateCostAllocationTagsStatusRequest(
            costAllocationTagsStatus: costAllocationTagsStatus
        )
        return try await self.updateCostAllocationTagsStatus(input, logger: logger)
    }

    /// Updates an existing Cost Category. Changes made to the Cost Category rules will be used to categorize the current month’s expenses and future expenses. This won’t change categorization for the previous months.
    @Sendable
    @inlinable
    public func updateCostCategoryDefinition(_ input: UpdateCostCategoryDefinitionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateCostCategoryDefinitionResponse {
        try await self.client.execute(
            operation: "UpdateCostCategoryDefinition", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates an existing Cost Category. Changes made to the Cost Category rules will be used to categorize the current month’s expenses and future expenses. This won’t change categorization for the previous months.
    ///
    /// Parameters:
    ///   - costCategoryArn: The unique identifier for your Cost Category.
    ///   - defaultValue: 
    ///   - effectiveStart: The Cost Category's effective start date. It can only be a billing start date (first day of the month). If the date isn't provided, it's the first day of the current month. Dates can't be before the previous twelve months, or in the future.
    ///   - rules: The Expression object used to categorize costs. For more information, see CostCategoryRule .
    ///   - ruleVersion: 
    ///   - splitChargeRules:  The split charge rules used to allocate your charges between your Cost Category values.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateCostCategoryDefinition(
        costCategoryArn: String,
        defaultValue: String? = nil,
        effectiveStart: String? = nil,
        rules: [CostCategoryRule],
        ruleVersion: CostCategoryRuleVersion,
        splitChargeRules: [CostCategorySplitChargeRule]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateCostCategoryDefinitionResponse {
        let input = UpdateCostCategoryDefinitionRequest(
            costCategoryArn: costCategoryArn, 
            defaultValue: defaultValue, 
            effectiveStart: effectiveStart, 
            rules: rules, 
            ruleVersion: ruleVersion, 
            splitChargeRules: splitChargeRules
        )
        return try await self.updateCostCategoryDefinition(input, logger: logger)
    }
}

extension CostExplorer {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: CostExplorer, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension CostExplorer {
    /// Return PaginatorSequence for operation ``getAnomalies(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getAnomaliesPaginator(
        _ input: GetAnomaliesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetAnomaliesRequest, GetAnomaliesResponse> {
        return .init(
            input: input,
            command: self.getAnomalies,
            inputKey: \GetAnomaliesRequest.nextPageToken,
            outputKey: \GetAnomaliesResponse.nextPageToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getAnomalies(_:logger:)``.
    ///
    /// - Parameters:
    ///   - dateInterval: Assigns the start and end dates for retrieving cost anomalies. The returned anomaly object will have an AnomalyEndDate in the specified time range.
    ///   - feedback: Filters anomaly results by the feedback field on the anomaly object.
    ///   - maxResults: The number of entries a paginated response contains.
    ///   - monitorArn: Retrieves all of the cost anomalies detected for a specific cost anomaly monitor Amazon Resource Name (ARN).
    ///   - totalImpact: Filters anomaly results by the total impact field on the anomaly object. For example, you can filter anomalies GREATER_THAN 200.00 to retrieve anomalies, with an estimated dollar impact greater than 200.
    ///   - logger: Logger used for logging
    @inlinable
    public func getAnomaliesPaginator(
        dateInterval: AnomalyDateInterval,
        feedback: AnomalyFeedbackType? = nil,
        maxResults: Int? = nil,
        monitorArn: String? = nil,
        totalImpact: TotalImpactFilter? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetAnomaliesRequest, GetAnomaliesResponse> {
        let input = GetAnomaliesRequest(
            dateInterval: dateInterval, 
            feedback: feedback, 
            maxResults: maxResults, 
            monitorArn: monitorArn, 
            totalImpact: totalImpact
        )
        return self.getAnomaliesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``getAnomalyMonitors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getAnomalyMonitorsPaginator(
        _ input: GetAnomalyMonitorsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetAnomalyMonitorsRequest, GetAnomalyMonitorsResponse> {
        return .init(
            input: input,
            command: self.getAnomalyMonitors,
            inputKey: \GetAnomalyMonitorsRequest.nextPageToken,
            outputKey: \GetAnomalyMonitorsResponse.nextPageToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getAnomalyMonitors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The number of entries that a paginated response contains.
    ///   - monitorArnList: A list of cost anomaly monitor ARNs.
    ///   - logger: Logger used for logging
    @inlinable
    public func getAnomalyMonitorsPaginator(
        maxResults: Int? = nil,
        monitorArnList: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetAnomalyMonitorsRequest, GetAnomalyMonitorsResponse> {
        let input = GetAnomalyMonitorsRequest(
            maxResults: maxResults, 
            monitorArnList: monitorArnList
        )
        return self.getAnomalyMonitorsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``getAnomalySubscriptions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getAnomalySubscriptionsPaginator(
        _ input: GetAnomalySubscriptionsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetAnomalySubscriptionsRequest, GetAnomalySubscriptionsResponse> {
        return .init(
            input: input,
            command: self.getAnomalySubscriptions,
            inputKey: \GetAnomalySubscriptionsRequest.nextPageToken,
            outputKey: \GetAnomalySubscriptionsResponse.nextPageToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getAnomalySubscriptions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The number of entries a paginated response contains.
    ///   - monitorArn: Cost anomaly monitor ARNs.
    ///   - subscriptionArnList: A list of cost anomaly subscription ARNs.
    ///   - logger: Logger used for logging
    @inlinable
    public func getAnomalySubscriptionsPaginator(
        maxResults: Int? = nil,
        monitorArn: String? = nil,
        subscriptionArnList: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetAnomalySubscriptionsRequest, GetAnomalySubscriptionsResponse> {
        let input = GetAnomalySubscriptionsRequest(
            maxResults: maxResults, 
            monitorArn: monitorArn, 
            subscriptionArnList: subscriptionArnList
        )
        return self.getAnomalySubscriptionsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``getCostAndUsageComparisons(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getCostAndUsageComparisonsPaginator(
        _ input: GetCostAndUsageComparisonsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetCostAndUsageComparisonsRequest, GetCostAndUsageComparisonsResponse> {
        return .init(
            input: input,
            command: self.getCostAndUsageComparisons,
            inputKey: \GetCostAndUsageComparisonsRequest.nextPageToken,
            outputKey: \GetCostAndUsageComparisonsResponse.nextPageToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getCostAndUsageComparisons(_:logger:)``.
    ///
    /// - Parameters:
    ///   - baselineTimePeriod: The reference time period for comparison. This time period serves as the baseline against which other cost and usage data will be compared. The interval must start and end on the first day of a month, with a duration of exactly one month.
    ///   - billingViewArn: The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.
    ///   - comparisonTimePeriod: The comparison time period for analysis. This time period's cost and usage data will be compared against the baseline time period. The interval must start and end on the first day of a month, with a duration of exactly one month.
    ///   - filter: 
    ///   - groupBy: You can group results using the attributes DIMENSION, TAG, and COST_CATEGORY.
    ///   - maxResults: The maximum number of results that are returned for the request.
    ///   - metricForComparison: The cost and usage metric to compare. Valid values are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.
    ///   - logger: Logger used for logging
    @inlinable
    public func getCostAndUsageComparisonsPaginator(
        baselineTimePeriod: DateInterval,
        billingViewArn: String? = nil,
        comparisonTimePeriod: DateInterval,
        filter: Expression? = nil,
        groupBy: [GroupDefinition]? = nil,
        maxResults: Int? = nil,
        metricForComparison: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetCostAndUsageComparisonsRequest, GetCostAndUsageComparisonsResponse> {
        let input = GetCostAndUsageComparisonsRequest(
            baselineTimePeriod: baselineTimePeriod, 
            billingViewArn: billingViewArn, 
            comparisonTimePeriod: comparisonTimePeriod, 
            filter: filter, 
            groupBy: groupBy, 
            maxResults: maxResults, 
            metricForComparison: metricForComparison
        )
        return self.getCostAndUsageComparisonsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``getCostComparisonDrivers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getCostComparisonDriversPaginator(
        _ input: GetCostComparisonDriversRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetCostComparisonDriversRequest, GetCostComparisonDriversResponse> {
        return .init(
            input: input,
            command: self.getCostComparisonDrivers,
            inputKey: \GetCostComparisonDriversRequest.nextPageToken,
            outputKey: \GetCostComparisonDriversResponse.nextPageToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getCostComparisonDrivers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - baselineTimePeriod: The reference time period for comparison. This time period serves as the baseline against which other cost and usage data will be compared. The interval must start and end on the first day of a month, with a duration of exactly one month.
    ///   - billingViewArn: The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.
    ///   - comparisonTimePeriod: The comparison time period for analysis. This time period's cost and usage data will be compared against the baseline time period. The interval must start and end on the first day of a month, with a duration of exactly one month.
    ///   - filter: 
    ///   - groupBy: You can group results using the attributes DIMENSION, TAG, and COST_CATEGORY. Note that SERVICE and USAGE_TYPE dimensions are automatically included in the cost comparison drivers analysis.
    ///   - maxResults: The maximum number of results that are returned for the request.
    ///   - metricForComparison: The cost and usage metric to compare. Valid values are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.
    ///   - logger: Logger used for logging
    @inlinable
    public func getCostComparisonDriversPaginator(
        baselineTimePeriod: DateInterval,
        billingViewArn: String? = nil,
        comparisonTimePeriod: DateInterval,
        filter: Expression? = nil,
        groupBy: [GroupDefinition]? = nil,
        maxResults: Int? = nil,
        metricForComparison: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetCostComparisonDriversRequest, GetCostComparisonDriversResponse> {
        let input = GetCostComparisonDriversRequest(
            baselineTimePeriod: baselineTimePeriod, 
            billingViewArn: billingViewArn, 
            comparisonTimePeriod: comparisonTimePeriod, 
            filter: filter, 
            groupBy: groupBy, 
            maxResults: maxResults, 
            metricForComparison: metricForComparison
        )
        return self.getCostComparisonDriversPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``getSavingsPlansCoverage(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getSavingsPlansCoveragePaginator(
        _ input: GetSavingsPlansCoverageRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetSavingsPlansCoverageRequest, GetSavingsPlansCoverageResponse> {
        return .init(
            input: input,
            command: self.getSavingsPlansCoverage,
            inputKey: \GetSavingsPlansCoverageRequest.nextToken,
            outputKey: \GetSavingsPlansCoverageResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getSavingsPlansCoverage(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filter: Filters Savings Plans coverage data by dimensions. You can filter data for Savings Plans usage with the following dimensions:    LINKED_ACCOUNT     REGION     SERVICE     INSTANCE_FAMILY     GetSavingsPlansCoverage uses the same Expression object as the other operations, but only AND is supported among each dimension. If there are multiple values for a dimension, they are OR'd together. Cost category is also supported.
    ///   - granularity: The granularity of the Amazon Web Services cost data for your Savings Plans. Granularity can't be set if GroupBy is set. The GetSavingsPlansCoverage operation supports only DAILY and MONTHLY granularities.
    ///   - groupBy: You can group the data using the attributes INSTANCE_FAMILY, REGION, or SERVICE.
    ///   - maxResults: The number of items to be returned in a response. The default is 20, with a minimum value of 1.
    ///   - metrics: The measurement that you want your Savings Plans coverage reported in. The only valid value is SpendCoveredBySavingsPlans.
    ///   - sortBy: The value that you want to sort the data by. The following values are supported for Key:    SpendCoveredBySavingsPlan     OnDemandCost     CoveragePercentage     TotalCost     InstanceFamily     Region     Service    The supported values for SortOrder are ASCENDING and DESCENDING.
    ///   - timePeriod: The time period that you want the usage and costs for. The Start date must be within 13 months. The End date must be after the Start date, and before the current date. Future dates can't be used as an End date.
    ///   - logger: Logger used for logging
    @inlinable
    public func getSavingsPlansCoveragePaginator(
        filter: Expression? = nil,
        granularity: Granularity? = nil,
        groupBy: [GroupDefinition]? = nil,
        maxResults: Int? = nil,
        metrics: [String]? = nil,
        sortBy: SortDefinition? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetSavingsPlansCoverageRequest, GetSavingsPlansCoverageResponse> {
        let input = GetSavingsPlansCoverageRequest(
            filter: filter, 
            granularity: granularity, 
            groupBy: groupBy, 
            maxResults: maxResults, 
            metrics: metrics, 
            sortBy: sortBy, 
            timePeriod: timePeriod
        )
        return self.getSavingsPlansCoveragePaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``getSavingsPlansUtilizationDetails(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getSavingsPlansUtilizationDetailsPaginator(
        _ input: GetSavingsPlansUtilizationDetailsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetSavingsPlansUtilizationDetailsRequest, GetSavingsPlansUtilizationDetailsResponse> {
        return .init(
            input: input,
            command: self.getSavingsPlansUtilizationDetails,
            inputKey: \GetSavingsPlansUtilizationDetailsRequest.nextToken,
            outputKey: \GetSavingsPlansUtilizationDetailsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getSavingsPlansUtilizationDetails(_:logger:)``.
    ///
    /// - Parameters:
    ///   - dataType: The data type.
    ///   - filter: Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the following dimensions:    LINKED_ACCOUNT     SAVINGS_PLAN_ARN     REGION     PAYMENT_OPTION     INSTANCE_TYPE_FAMILY     GetSavingsPlansUtilizationDetails uses the same Expression object as the other operations, but only AND is supported among each dimension.
    ///   - maxResults: The number of items to be returned in a response. The default is 20, with a minimum value of 1.
    ///   - sortBy: The value that you want to sort the data by. The following values are supported for Key:    UtilizationPercentage     TotalCommitment     UsedCommitment     UnusedCommitment     NetSavings     AmortizedRecurringCommitment     AmortizedUpfrontCommitment    The supported values for SortOrder are ASCENDING and DESCENDING.
    ///   - timePeriod: The time period that you want the usage and costs for. The Start date must be within 13 months. The End date must be after the Start date, and before the current date. Future dates can't be used as an End date.
    ///   - logger: Logger used for logging
    @inlinable
    public func getSavingsPlansUtilizationDetailsPaginator(
        dataType: [SavingsPlansDataType]? = nil,
        filter: Expression? = nil,
        maxResults: Int? = nil,
        sortBy: SortDefinition? = nil,
        timePeriod: DateInterval,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetSavingsPlansUtilizationDetailsRequest, GetSavingsPlansUtilizationDetailsResponse> {
        let input = GetSavingsPlansUtilizationDetailsRequest(
            dataType: dataType, 
            filter: filter, 
            maxResults: maxResults, 
            sortBy: sortBy, 
            timePeriod: timePeriod
        )
        return self.getSavingsPlansUtilizationDetailsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listCostAllocationTagBackfillHistory(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listCostAllocationTagBackfillHistoryPaginator(
        _ input: ListCostAllocationTagBackfillHistoryRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListCostAllocationTagBackfillHistoryRequest, ListCostAllocationTagBackfillHistoryResponse> {
        return .init(
            input: input,
            command: self.listCostAllocationTagBackfillHistory,
            inputKey: \ListCostAllocationTagBackfillHistoryRequest.nextToken,
            outputKey: \ListCostAllocationTagBackfillHistoryResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listCostAllocationTagBackfillHistory(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults:  The maximum number of objects that are returned for this request.
    ///   - logger: Logger used for logging
    @inlinable
    public func listCostAllocationTagBackfillHistoryPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListCostAllocationTagBackfillHistoryRequest, ListCostAllocationTagBackfillHistoryResponse> {
        let input = ListCostAllocationTagBackfillHistoryRequest(
            maxResults: maxResults
        )
        return self.listCostAllocationTagBackfillHistoryPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listCostAllocationTags(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listCostAllocationTagsPaginator(
        _ input: ListCostAllocationTagsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListCostAllocationTagsRequest, ListCostAllocationTagsResponse> {
        return .init(
            input: input,
            command: self.listCostAllocationTags,
            inputKey: \ListCostAllocationTagsRequest.nextToken,
            outputKey: \ListCostAllocationTagsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listCostAllocationTags(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of objects that are returned for this request. By default, the request returns 100 results.
    ///   - status: The status of cost allocation tag keys that are returned for this request.
    ///   - tagKeys: The list of cost allocation tag keys that are returned for this request.
    ///   - type: The type of CostAllocationTag object that are returned for this request. The AWSGenerated type tags are tags that Amazon Web Services defines and applies to support Amazon Web Services resources for cost allocation purposes. The UserDefined type tags are tags that you define, create, and apply to resources.
    ///   - logger: Logger used for logging
    @inlinable
    public func listCostAllocationTagsPaginator(
        maxResults: Int? = nil,
        status: CostAllocationTagStatus? = nil,
        tagKeys: [String]? = nil,
        type: CostAllocationTagType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListCostAllocationTagsRequest, ListCostAllocationTagsResponse> {
        let input = ListCostAllocationTagsRequest(
            maxResults: maxResults, 
            status: status, 
            tagKeys: tagKeys, 
            type: type
        )
        return self.listCostAllocationTagsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listCostCategoryDefinitions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listCostCategoryDefinitionsPaginator(
        _ input: ListCostCategoryDefinitionsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListCostCategoryDefinitionsRequest, ListCostCategoryDefinitionsResponse> {
        return .init(
            input: input,
            command: self.listCostCategoryDefinitions,
            inputKey: \ListCostCategoryDefinitionsRequest.nextToken,
            outputKey: \ListCostCategoryDefinitionsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listCostCategoryDefinitions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - effectiveOn: The date when the Cost Category was effective.
    ///   - maxResults: The number of entries a paginated response contains.
    ///   - logger: Logger used for logging
    @inlinable
    public func listCostCategoryDefinitionsPaginator(
        effectiveOn: String? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListCostCategoryDefinitionsRequest, ListCostCategoryDefinitionsResponse> {
        let input = ListCostCategoryDefinitionsRequest(
            effectiveOn: effectiveOn, 
            maxResults: maxResults
        )
        return self.listCostCategoryDefinitionsPaginator(input, logger: logger)
    }
}

extension CostExplorer.GetAnomaliesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CostExplorer.GetAnomaliesRequest {
        return .init(
            dateInterval: self.dateInterval,
            feedback: self.feedback,
            maxResults: self.maxResults,
            monitorArn: self.monitorArn,
            nextPageToken: token,
            totalImpact: self.totalImpact
        )
    }
}

extension CostExplorer.GetAnomalyMonitorsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CostExplorer.GetAnomalyMonitorsRequest {
        return .init(
            maxResults: self.maxResults,
            monitorArnList: self.monitorArnList,
            nextPageToken: token
        )
    }
}

extension CostExplorer.GetAnomalySubscriptionsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CostExplorer.GetAnomalySubscriptionsRequest {
        return .init(
            maxResults: self.maxResults,
            monitorArn: self.monitorArn,
            nextPageToken: token,
            subscriptionArnList: self.subscriptionArnList
        )
    }
}

extension CostExplorer.GetCostAndUsageComparisonsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CostExplorer.GetCostAndUsageComparisonsRequest {
        return .init(
            baselineTimePeriod: self.baselineTimePeriod,
            billingViewArn: self.billingViewArn,
            comparisonTimePeriod: self.comparisonTimePeriod,
            filter: self.filter,
            groupBy: self.groupBy,
            maxResults: self.maxResults,
            metricForComparison: self.metricForComparison,
            nextPageToken: token
        )
    }
}

extension CostExplorer.GetCostComparisonDriversRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CostExplorer.GetCostComparisonDriversRequest {
        return .init(
            baselineTimePeriod: self.baselineTimePeriod,
            billingViewArn: self.billingViewArn,
            comparisonTimePeriod: self.comparisonTimePeriod,
            filter: self.filter,
            groupBy: self.groupBy,
            maxResults: self.maxResults,
            metricForComparison: self.metricForComparison,
            nextPageToken: token
        )
    }
}

extension CostExplorer.GetSavingsPlansCoverageRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CostExplorer.GetSavingsPlansCoverageRequest {
        return .init(
            filter: self.filter,
            granularity: self.granularity,
            groupBy: self.groupBy,
            maxResults: self.maxResults,
            metrics: self.metrics,
            nextToken: token,
            sortBy: self.sortBy,
            timePeriod: self.timePeriod
        )
    }
}

extension CostExplorer.GetSavingsPlansUtilizationDetailsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CostExplorer.GetSavingsPlansUtilizationDetailsRequest {
        return .init(
            dataType: self.dataType,
            filter: self.filter,
            maxResults: self.maxResults,
            nextToken: token,
            sortBy: self.sortBy,
            timePeriod: self.timePeriod
        )
    }
}

extension CostExplorer.ListCostAllocationTagBackfillHistoryRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CostExplorer.ListCostAllocationTagBackfillHistoryRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension CostExplorer.ListCostAllocationTagsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CostExplorer.ListCostAllocationTagsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            status: self.status,
            tagKeys: self.tagKeys,
            type: self.type
        )
    }
}

extension CostExplorer.ListCostCategoryDefinitionsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CostExplorer.ListCostCategoryDefinitionsRequest {
        return .init(
            effectiveOn: self.effectiveOn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
